Open dsellers1 opened 2 years ago
This should be an easy fix. I will take a look.
It's because of this issue. Hass.io does not support -
characters in entity names.
It's because of this issue. Hass.io does not support
-
characters in entity names.
That's the problem. The hyphen isn't supposed to be there. HassWS is setting the friendly name to include the hyphen.
In my example posted above, the prefix was set as "desktop_" (which after some experimentation "desktop" would accomplish the same since it looks like HassWS appends an underscore automatically if there isn't one).
The information from the link is talking about the Entity ID's name, not the friendly name. Entity IDs can only have lowercase letters, numbers, and underscores. The friendly name is more flexible and can include spaces.
Even hovering over the What's This? shows the name with a hyphen and entity ID with an underscore. They don't match. In theory, the name could simply replace the hyphen with a space.
can you please confirm that you are expecting the attributes to be :
entity Name : desktop ActiveWindowSensor
entity ID : sensor.desktop_activewindow
correct. bonus points if you can make the first letter of the entity name capitalized.
entity Name : Desktop ActiveWindowSensor entity ID : sensor.desktop_activewindowsensor
In HassWS, I set a prefix of "desktop_". Entity_IDs show correctly but the friendly name has a hyphen (-) between the prefix and the sensor name.
For example, in Home Assistant I see: Name = desktop_-CPULoad Entity ID = sensor.desktop_cpuload![J7vokkp 1](https://user-images.githubusercontent.com/67642332/141945819-fb0d6462-c935-4ca2-9264-dd4ce0383a13.png)