Continuing the discussion from Howto create battery alert without creating a template for every device:
I think i have found the unwanted and unconfigured sensors, they are originating from homeassistant, and not from my zwave-hub:
this is showing in the logs:
Client mosqsub|28383-core-ssh received PUBLISH (d0, q0, r1, m0, 'homeassistant/sensor/cv_garage_actueel/config', ... (159 bytes))
homeassistant/sensor/cv_garage_actueel/config {
"device_class": "sensor",
"name": "CV Garage actueel",
"state_topic": "homeassistant/sensor/cv_garage_actueel/state",
"unit_of_measurement": "Watt"
}
Client mosqsub|28383-core-ssh received PUBLISH (d0, q0, r1, m0, 'homeassistant/sensor/tester_actueel/config', ... (153 bytes))
homeassistant/sensor/tester_actueel/config {
"device_class": "sensor",
"name": "Tester actueel",
"state_topic": "homeassistant/sensor/tester_actueel/state",
"unit_of_measurement": "Watt"
}
Client mosqsub|28383-core-ssh received PUBLISH (d0, q0, r1, m0, 'homeassistant/sensor/quooker_keuken_actueel/config', ... (169 bytes))
homeassistant/sensor/quooker_keuken_actueel/config {
"device_class": "sensor",
"name": "Quooker Keuken actueel",
"state_topic": "homeassistant/sensor/quooker_keuken_actueel/state",
"unit_of_measurement": "Watt"
}
Client mosqsub|28383-core-ssh received PUBLISH (d0, q0, r1, m0, 'homeassistant/sensor/corridor_motion_sensor_battery/config', ... (182 bytes))
homeassistant/sensor/corridor_motion_sensor_battery/config {
"device_class": "sensor",
"name": "Corridor motion sensor Battery",
"state_topic": "homeassistant/sensor/corridor_motion_sensor_battery/state",
"unit_of_measurement": "%"
continuing with all other battery events originating from your package i presume.
@NotoriousBDG
Why these first 3 sensors suddenly are published is beyond me. especially the /config is new to me, is that some default value in mqtt or in your package maybe?
At least i can now try to issue a more precise “null” command… --edit-- and have managed to do so successfully with:
mosquitto_pub -h ipaddress -p 1883 -u Username -P Password -t "homeassistant/sensor/tester_actueel/config" -r -n
for each of them
… thanks @NotoriousBDG —end-edit----
the end of this bit is, and watch the R1 turn into R0…:
Client mosqsub|28383-core-ssh received PUBLISH (d0, q0, r1, m0, 'homeassistant/sensor/ipadred_battery/state', ... (2 bytes))
homeassistant/sensor/ipadred_battery/state 63
Client mosqsub|28383-core-ssh received PUBLISH (d0, q0, r1, m0, 'homeassistant/sensor/hue_dimmer_switch_1_battery/config', ... (176 bytes))
homeassistant/sensor/hue_dimmer_switch_1_battery/config {
"device_class": "sensor",
"name": "Hue dimmer switch 1 Battery",
"state_topic": "homeassistant/sensor/hue_dimmer_switch_1_battery/state",
"unit_of_measurement": "%"
}
Client mosqsub|28383-core-ssh received PUBLISH (d0, q0, r1, m0, 'homeassistant/sensor/hue_dimmer_switch_1_battery/state', ... (3 bytes))
homeassistant/sensor/hue_dimmer_switch_1_battery/state 100
Client mosqsub|28383-core-ssh received PUBLISH (d0, q0, r0, m0, 'macaddress/powerswitch-zwave/430ba8cf/usage', ... (3 bytes))
macaddress/powerswitch-zwave/430ba8cf/usage 0.8
Client mosqsub|28383-core-ssh received PUBLISH (d0, q0, r0, m0, 'macaddress/energy-dsmr4/538d72d9/T2', ... (7 bytes))
macaddress/energy-dsmr4/538d72d9/T2 5690.15
Client mosqsub|28383-core-ssh received PUBLISH (d0, q0, r0, m0, 'macaddress/energy-dsmr4/538d72d9/L1Pimp', ... (5 bytes))
macaddress/energy-dsmr4/538d72d9/L1Pimp 0.039
I wonder if i wouldn’t be better off with something like force_update instead of the retain value, because the retain value creates false values also. (retaining a value while the sensor has changed but isnt updated)
Then again, im not sure i see how a force_update could be sent to a Mqtt publisher not being the homeassistant instance itself?
Ive added this configuration variable now and will see what happens, if anything. Will try and stop the retain value in the publishing Hub.