You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the problem you have/What new integration you would like
I am finding that I am having to add a wrapper function for my state subscription callbacks because the subscribe_homeassistant_state callback doesn't return the attribute name as a parameter.
I would like the function changing (or a new one adding) from this:
e.g. this->subscribe_homeassistant_state([this](std::string entity_id, std::string state) { }, "light.my_light", "supported_modes");
To something like this
e.g. this->subscribe_homeassistant_state([this](std::string entity_id, std::string attribute, std::string state, std::string attribute) { }, "light.my_light", "supported_modes");
Essentially my project is an interface between a screen and Home Assistant. To build the commands for the screen I need to subscribe to state/attribute updates from HA entities that don't exist within the device, and because esphome 'components' represent internal device features which are exposed to HA, they don't work for what I need - which is a simple way to ask HA what the current state is of arbitrary entities.
There are many external entities and attributes that I need to monitor and creating a new function for every attribute type is not feasible. If the callback could include the attribute name I would then be able to remove all the additional functions mentioned here
Describe the problem you have/What new integration you would like
I am finding that I am having to add a wrapper function for my state subscription callbacks because the
subscribe_homeassistant_state
callback doesn't return the attribute name as a parameter.I would like the function changing (or a new one adding) from this:
e.g.
this->subscribe_homeassistant_state([this](std::string entity_id, std::string state) { }, "light.my_light", "supported_modes");
To something like this
e.g.
this->subscribe_homeassistant_state([this](std::string entity_id, std::string attribute, std::string state, std::string attribute) { }, "light.my_light", "supported_modes");
Please describe your use case for this integration and alternatives you've tried:
Currently, I am creating lots of wrapper functions (seen here) to give me the functionality but I have a lot more to add and it is getting messy now.
Additional context
The text was updated successfully, but these errors were encountered: