-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add analog_output platform #347
Comments
Another use case is dimmer control, like in https://github.com/dkagedal/dimmer There, I'm using an input_number to emulate an analog output that controls a dimmer controller. Making a dimmer platform for an analog output integration (I think the platform is the implementation, right, not the interface?) would make more sense. The state that is being controlled here is dimming velocity -/0/+. |
@dkagedal : why don't you use the light platform? |
@antonverburg : I try to explain i in the README. TL;DR: A light has a "brightness", but it doesn't have the state "currently dimming up". What I'm proposing is to add that state as a separate entity. The analog_ouput would not be tied to the brightness value, but to the dimmer "velocity". |
@antonverburg I'm not 100% clear on what you're describing, but it sounds like it might be similar to my custom input number component. From the README:
I created a pull request to add it to HA a while ago but it was rejected. Still, I think people would find lots of uses for an integration like this that can control and track* other integrations. *It doesn't have to track anything, it could be used only for control. |
Hi Jeff, it seems that you tried the same as Shulyaka in this thread: #328. I did not yet check your code, but according to balloob in home-assistant/core#22176 you are mixing the input_number code to create a template or platform. Don't do that, an input is an input, and should remain that. What I want is an equivalent for the switch platform that can implement analog output devices. |
@antonverburg yes, I know that my approach is frowned upon and would be rejected if I submitted it as a pull request to HA. Hence, I keep it as a custom component. My reason for using the
I respect that decision, even though I believe that such an integration that allows for templated tracking and automated control would be very useful. Naming and software architecture aside, I think my custom component can accomplish what you want: you change a slider to That's the sort of functionality you're looking for, right? It would be great if that could be added to HA! |
@JeffLIrion: Yes, that's exactly what I make. |
Implementing the UI I found that there are 2 comparable interface cards: the light card (for a light containing only brightness-configurable channel) and the 'input-number' card. The first one only contains an color-changing icon, a name and a switch-on/off button in row-elements. The later does not change icon color, and contains an icon, a name and a value-input field or slider in row-elements. What is the preferred visualization? To my feelings the first visualization is better. Normally such an output will be controlled by automations, so if the input is only controllable after an extra click is OK, and it gives more space to show the name. |
This has been added: the |
Context
For sensors we have the binary_sensor and the sensor platform. For output devices we have the switch, which is essentially a binary output. We do not yet have an analog output platform, that can be used to easily integrate analog outputs (like pwm control of pumps, etc).
Proposal
I am in the progress to create such a platform but I do not have much experience with home assistant, so please help me with a critical review when I post a pull request. Currently I use the switch - and light platforms as examples to build a new platform for a new analog output platform. I will also add an example implementation to test the platform. My code will be available at https://github.com/antonverburg/home-assistant/tree/analog_output?files=1
Consequences
As this is a new and separate development I do not see consequences for other components except from adding code.
The text was updated successfully, but these errors were encountered: