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
Hi @thomasloven
I would like to request an enhancement to the "default" option.
Currently
If the entity: template option is used, the result is computed and the state switch mechanism directs to the appropriate "state". The default: x option takes care of unknown/unrecognised states.
Issue
If the state is unknown/unrecognised, the default code doesn't know what the actual state value is/was.
This prevents at least 2 scenarios useful to developers:
Debugging - what state value was actually computed?
Parameters - the actual state value could be passed on to a child card for processing i.e. routing decisions, display etc.
Proposed solution
An implicit variable is available within the card and is accessed the same way as the existing variables.
I propose the name: state.result (up to you of course).
It may make sense to populate this variable with a result for all other entity types too to promote and facilitate generic code.
e.g. hash, user, group, deviceID, and mediaquery
Thanks for this useful card.
Guy
The text was updated successfully, but these errors were encountered:
Hi @thomasloven
I would like to request an enhancement to the "default" option.
Currently
If the
entity: template
option is used, the result is computed and the state switch mechanism directs to the appropriate "state". Thedefault: x
option takes care of unknown/unrecognised states.Issue
If the state is unknown/unrecognised, the default code doesn't know what the actual state value is/was.
This prevents at least 2 scenarios useful to developers:
Proposed solution
An implicit variable is available within the card and is accessed the same way as the existing variables.
I propose the name:
state.result
(up to you of course).It may make sense to populate this variable with a result for all other entity types too to promote and facilitate generic code.
e.g. hash, user, group, deviceID, and mediaquery
Thanks for this useful card.
Guy
The text was updated successfully, but these errors were encountered: