qJake / HADotNet.CommandCenter

📱 A web-based, wall-mountable command center for Home Assistant.
https://hacc.dev
Apache License 2.0
158 stars 11 forks source link

Add State Mapping for State Tile #120

Open qJake opened 3 years ago

qJake commented 3 years ago

Describe the new functionality

Add support for mapping any state from Home Assistant, to any display text.

What will it look like in the Admin area?

Probably just a textarea with one line being the mapping, so you'd have something like:

home:Here
not_home:Away
unknown:Where'd you go?

Or something to that effect.

💡 Bonus points: Support wildcards or regex: un*:Unknown or unavailable

Icons

Could also support icons, if we detect an icon prefix:

home:mdi:home
away:mdi:home-remove
unknown:mdi:home-alert

🚩 Will need to determine a good delimiter that's not normally found in an entity's state. Possibilities include: ~, ;, |.

What will it look like on the dashboard?

The state tile will display a more human-friendly state.