Hi,
I have installed and worked with Home Assistant on a raspberry pi for few days now. Just added some aqara zigbee devices via Zigbee2MQTT (fw 1.17.1) addon and all is working well, but the power plug is missing the voltage entity (I can see the voltage so the power plug is sending the info but it was not added as an separate entity).
Is there any way to manually add an entity to this device ?
Something like “sensor.0x00131d0001a16fb2_voltage”, “voltage”
Some info from device:
Zigbee model lumi.plug
Description Mi power plug ZigBee
Support status Supported
Firmware build date 02-28-2017
Vendor Xiaomi
Model ZNCZ02LM
Power source Battery
Interview completed Yes
I have to thank all developers of HassOS. Thank you.
I solved the problem by clicking the Developer Tools and in STATES tab, I simply added the new entity with the missing value. Now I have the voltage too.
After I add the entity to States in dev tools, if I restart the server, the entity is not saved.
Can you tell me how to save the entity after creating it manually ?
I have a xiaomi zigbee plug added to my raspberry pi via zigbee2mqtt
If I go to zigbee2mqtt and select this plug and then choose STATE tab I can see
{
“consumption”: 0.37,
“energy”: 0.37,
“linkquality”: 94,
“power”: 0,
“power_outage_memory”: true,
“state”: “OFF”,
“temperature”: 26,
“voltage”: 234
}
However if I go to the Configuration / Entities it will not display an entity for voltage on this plug (the plug is providing the information)
So under Developer Tools under the STATES tab I clicked on an entity from this plug:
sensor.bucatarie_priza_1_temperature
Then I changed on top of the page
Entity:
sensor.bucatarie_priza_1_voltage
State:
0
State attributes (YAML, optional)
consumption: 0.37
energy: 0.37
linkquality: 94
power: 0
state: ‘OFF’
temperature: 28
voltage: 234
unit_of_measurement: V
friendly_name: bucatarie.priza.1 voltage
device_class: voltage
After this I press SET STATE
After this, I can see the new entity for voltage but if I restart server all is lost
I have already added:to /config/configuration.yaml
homeassistant:
customize: !include customize.yaml
and to /config/customize.yaml
sensor.bucatarie_priza_1_voltage:
device_class: voltage
That’s not how you add entities. If you want a separate entity for the voltage, you need to configure a template sensor in configuration.yaml (or sensors.yaml or in a package, don’t know how you set it up).
This would create a new entity called sensor.bucatarie_priza_1_voltage
First I must mention that I am new (2 weeks in touch with Home Assistant). So I did use auto-discovery in zigbee2mqtt.
I wish I knew how to manually add this voltage entity in the devices that zigbee2mqtt discovered. It is important for me to know when voltage drops under 190v and I was lucky to get one xiaomi plug that shows the voltage.value but unfortunaelly, I think that developers of this plugin did not implement voltage component since only few plugs provide it…
I don’t understand what you are talking about, your plug shows voltage, it’s just not a separate entity but instead an attribute of an entity. I showed you above how you can extract the voltage and get a separate emtity for the voltage.