zwave-js / zwave-js-ui

Full featured Z-Wave Control Panel UI and MQTT gateway. Built using Nodejs, and Vue/Vuetify
https://zwave-js.github.io/zwave-js-ui
MIT License
987 stars 201 forks source link

Why is entity name template not available unless MQTT Discovery is enabled? #2673

Closed sofakng closed 2 years ago

sofakng commented 2 years ago

Is it expected behavior that the [Settings] -> [Home Assistant] -> [Entity name template] is only available if [MQTT Discovery] is enabled?

I'm using the Home Assistant Z-Wave JS integration (instead of MQTT discovery) because I believe it has more features/options available (?), but this configuration doesn't allow me to specify an entity naming template.

For example, I have a Z-Wave device with a name of "Ceiling Fan" and a location of "Living Room". The HA Z-Wave JS integration creates an entity named "light.ceiling_fan" but I'd prefer it be named "light.living_room_ceiling_fan" (or whatever else).

kpine commented 2 years ago

The entity name template is only for MQTT discovery. The Z-Wave integration decides how to name entities. The only influence you have from zwave-js-ui is by node name.

sofakng commented 2 years ago

Thanks for the information. This is unrelated (and perhaps personal preference) but do you recommend naming the Z-Wave devices to include the location? For example, "Living Room - Ceiling Fan" with location of "Living Room" ?

kpine commented 2 years ago

It's entirely personal preference, IMO. I don't name anything in zwave-js-ui, and leave it to HA. I do set locations in both places. You'll find entirely different answers from different people. Some people prefer to stick with zwave-js-ui entirely and let the names trickle to HA, but that requires more effort, again IMO.

AaronSeibert commented 2 years ago

I use HA mostly as a visual control board for entities - my automations are in node-red (with some direct z-wave associations). To me, it makes more logical sense to name a light switch in my office, for instance, as "Lights" and assign it to the Office area/location. However, that doesn't work well in the HA UI. So instead, I do name my entities as Office Lights, set the area in zwavejs, and that ensures there aren't any clashing entity id's on the HA side (nothing like "hmm, what does light.lights_3 actually control?").

This way also when using SmartStart, entity_ids are consistent in HA even if I have to factory reset devices or forget to take an NVM backup prior to trying to migrate from one controller stick to another and borking the controller promotion... whoops.