HOW Customizing entity/state use api/mqtt not use configuration file?

HOW Customizing entity or state use api or mqtt, not use configuration file?

such as: friendly_name field.

go to the dev-states page and click the weblink box next to the entity. in the box that pops up in the top right corner there may be a gear icon. if it’s there, click it and enter the friendly name there. if the gear icon isn’t there then you need to go to the “configuration” menu and click on “customization”. Find the entity in the list and change it there instead.

If you want to dynamically or temporary change entity state/attributes, even create new ones, then read on.

POST /api/states, can change/create entity with CURL outside of HA, or hass.states.set can do the same in HA’s python_script.

These changes are not ‘permanent’, HA will revert the entity to its original definition at next update/restart.

For existing entities, the change will be in effect until HA updates the entity or restart.
For entities not existed in HA, the entities will exist until HA restart.

For example, I used the CURL method with tasker to create a device_tracker entity once I disconnect from home wifi (leave home).
There was a discussion yesterday do this with Automate/MQTT in the forum.

1 Like