Giter Site home page Giter Site logo

Comments (8)

cgiesche avatar cgiesche commented on May 30, 2024 2

I am considering to consider to take a look at what could be done, if i would decide to try implement this ;). This would of course only work for switches and lights, and i would not be able to add "labels" to the image.

*considering*

from streamdeck-homeassistant.

cgiesche avatar cgiesche commented on May 30, 2024 1

Hi rvst,

first of all, thank you for your suggestion! I already thought about something similar, but came to the decision to not implement this kind of feature (yet). The main difficulty in my plugin is that it supports many different entity types and generates images (svg) dynamically. Mixing this dynamic approach with the configuration approach could work, but would make the implementation much less generic. In addition, you can only configure two different images, most likely this would be an "on-image" and an "off-image". How would i decide, where to use this image? Only on Switches? Or Lights? Boolean sensors?

Maybe i will come back to this idea sometime.

from streamdeck-homeassistant.

EpicLPer avatar EpicLPer commented on May 30, 2024 1

Not sure if you'll still see this @cgiesche but maybe you can make 2 different "Home Assistant Entities" for this in the right panel to pick from. One that has this kind of function and one that's just the normal standard thing we have right now, could potentially solve this issue.

from streamdeck-homeassistant.

cgiesche avatar cgiesche commented on May 30, 2024 1

Can you access normal web image links?
While your workaround probably is more than enough for me, I'd still love to see an option to just plug in direct image links to imgur or something, if that is at all possible.

This may be possible. I will give it a try.

Edit: Idk if this is the right issue for it, but maybe you could add an option to change the colours of the default sliders/icons? That would probably also be enough for many already.

With the last update, i already prepared the code for customizable colors. It will be available soom(tm). I will create a new ticket for this.

from streamdeck-homeassistant.

cgiesche avatar cgiesche commented on May 30, 2024 1

Experimental Version will be part of next release.

from streamdeck-homeassistant.

DerLeole avatar DerLeole commented on May 30, 2024

Sorry to open this up again.

One possible solution for this, together with fixing the more than two icons problem, could be providing text fields where users can specify the path to the icon they want.
For every icon you dynamically create, a new box could appear on your custom setup window, where one could provide the offline path or link to override that specific generated image.
Could that work?

That way you could also go a layered approach and still overlay things like the green dot on the corner, over custom icons (maybe as a checkbox option).

One reference for this would be BarRaiders OBSTools where he uses a similar method.

from streamdeck-homeassistant.

cgiesche avatar cgiesche commented on May 30, 2024

Hey Leolele99,

of course, allowing the user to define the path to an icon sounds like the easy way to go. Unfortunatelly I choose the "web-way" (JavaScript) to implement the plugin. With that approach, i am very limited when it comes to accessing resources (files) from the user's computer (in fact, i think i can not access them at all, it's a safety feature). I think even "fake" file uploads (like in normal websites) would not work.
If i would be able to get the image data, overlaying them with labels or the "dot" would be quite easy. As far as i can see, the BarRaider plugin(s) are native .NET applications which are much less limited compared to javascript.

My current approach is to use the built in custom icon selection. The drawback of this approach is, that i can not access the icon content from my code. I can only tell streamdeck to switch to user-icon 0 or 1. No chance to manipulate that image.

I added a second button type that allowes to choose custom icons for "on/off" entities (it feels hacky and i dont like it, but it seems to work). Maybe i can release a preview this weekend:

image
image
image

from streamdeck-homeassistant.

DerLeole avatar DerLeole commented on May 30, 2024

Can you access normal web image links?
While your workaround probably is more than enough for me, I'd still love to see an option to just plug in direct image links to imgur or something, if that is at all possible.

Thanks for your quick answer anyways, looking forward to the preview!

Edit: Idk if this is the right issue for it, but maybe you could add an option to change the colours of the default sliders/icons? That would probably also be enough for many already.

from streamdeck-homeassistant.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.