Closed pixelwave closed 2 years ago
Hi, the component will output the name of the streamer as the entity id. I think you can change it from inside Home Assistant by clicking 'developer tool'. There is a small guide here: https://www.home-assistant.io/docs/configuration/customizing-devices/
Also looks like this from inside HA:
Thats what I did for now. But renaming all of them might be cumbersome in the future. I had the same issue with the custom "discord_game" integration on HACS. That naming convention was later changed from "sensor.discordid" to "sensor.discorduser_discordid" which is handy when using automated fill lists etc.
Maybe a future improvement?
Ok, cool. I agree with you. The reason it's this way is because the original core component generated the entity ids in the same way. In hindsight, I should probably have changed it, but I didn't really think much about it.
Though, I'm not sure how much of a breaking change it will be to change it now.
Good timing. Just installed this component and was a bit annoyed by the same thing when configuring the lovelace card. Would be great if there was a (configurable/optional?) suffix. If "suffix" variable isn't set it could use sensor.channel and if it is set to "twitch_" it would be sensor.twitch_channel. Shouldn't break anything :)
Having a suffix would also greatly improve management of the cards, so you could use auto-entities or similar (matching on "sensor.twitch_") to avoid having to update both the component config and* the card where streamers are shown.
Thanks for the component btw!
Or rather, prefix. Not suffix.
... sensor.twitchtv_channelname
would be awesome! :)
... or in short sensor.ttv_channelname
@rasssta - Sounds like a good idea! I'll see if I can implement it in one of the following days.
The issue was automatically closed by merging a PR into the master branch. I created a new release https://github.com/Radioh/ha_twitch_helix/releases/tag/v.0.5.1
I've added "entity_prefix" as an optional config parameter. It will not override ids on already existing entities if you add it. It will only set it on new ones. Check it out and let me know if there is any issues. :)
Works like a charm! Thanks a lot. Already updated my integration ... :)
Works here as well, thanks!
Everything works perfectly but how can I change the output sensors from "sensor.channelname" to "sensor.twitchtv_channelname"?