I’m setting up a Node-RED flow to set the friendly_name of my SeventeenTrack packages (because It really clutters up the UI when they’re all prefixed with 'Seventeentrack Package: ')
Currently I’m trying to do this via a POST to the HTTP States API - something like:
POST /api/states/sensor.seventeentrack_package_mypackage
{"state":"[Entity's Current State]","attributes":{"friendly_name":"mypackage"}}
The call initially succeeds and updates the name shown in the UI, but it reverts about 10 seconds later. I’m also not seeing any changes being made to the entities in .storage/core.entity_registry, which are made when changing the Friendly Name directly via the UI (which does persist).
Has anyone got any ideas as to how I can get the changes to persist? Also open to any alternate ways of doing this (which don’t involve manually setting the name in the UI)
I’ve also tried using the same method for the Coronavirus sensors, which also revert, so it doesn’t appear to be limited to one integration.
But maybe I’m mistaken and that’s not what you want?
Looking at this:
POST /api/states/sensor.seventeentrack_package_mypackage
If you DON’T want seventeentrack_package why are you setting that as the name of the sensor? Or do you just want the friendly name changed? Customize should do that
Have to eat my words here; they still disappear, but only much later/on a restart.
The solution that I went with now uses template-sensors as permanent placeholders.