home-assistant / architecture

Repo to discuss Home Assistant architecture
313 stars 100 forks source link

Add new Number entity component #453

Closed Shulyaka closed 3 years ago

Shulyaka commented 3 years ago

Context

Add new integration for an analog switch, a new entity type that other platforms may use to get a value from user. We already have a number of integrations that allow the user to set a certain value within a range, such as light, climate, humidifier, input_number, and media_player. However we lack the generic integration that other integrations or platforms could use for a value input, along with sensor for value output, binary_sensor for boolean output, and switch for boolean input.

Proposal

The proposal is to create new analog_switch integration.

The integration would allow to create a separate entity to control a volume for something that is not a media player (i.e. an alarm clock), or to control volume of more than 1 channel for a media player that needs it (multichannel or equalizer may be?), or to control the brightness of indicator LEDs of an air purifier device, or to set PWM level for a ZHA XBee device, all without complicated setup that involved manual input_numbers, automations, and services, or using entities that not exactly fit the actual device. Other examples of the possible usage include:

Consequences

This is a new base entity that would allow those integrations that need it to represent entities in a more natural and user friendly way.

balloob commented 3 years ago

I approve of this idea.

Some comments:

Shulyaka commented 3 years ago

Thanks a lot! Agree with the comments.

frenck commented 3 years ago

Yeah, I agree with the comments by balloob as well.

A lot of integrations can benefit from an input_number-a-like entity-component. I think it would help solve an often put out request, where integrations want to use the input_number at this point.