Thanks for creating this @Sennevds. I cloned the repo so that I could modify the state topic prefixes to fit in with my local scheme (might it be worth considering having this as a config item rather than hard-coded?)
I’ve got it working, to the extent that the entities are registered on HA and appear in the UI, and HA is receiving the state updates. However, the entity states are not being updated.
The fact that HA is receiving the state updates indicates that “state_topic” was correct in the config
message, and that the device is sending on the correct state_topic, so that seems to cover the only changes I made to the code.
Any ideas? Here’s some log info
2020-06-26 10:24:29 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/dellups/dellupsTemp/config (retained): b'{"device_class":"temperature","name":"dellupsTemperature","state_topic":"tel/19c/dellups/state","unit_of_measurement":"\xc2\xb0C","value_template":"{{ value_json.temperature}}","unique_id":"dellups_sensor_temperature","device":{"identifiers":["dellups_sensor"],"name":"dellupsSensors","model":"RPI dellups","manufacturer":"RPI"}, "icon":"mdi:thermometer"}'
2020-06-26 10:24:29 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/dellups/dellupsDiskUse/config (retained): b'{"name":"dellupsDiskUse","state_topic":"tel/19c/dellups/state","unit_of_measurement":"%","value_template":"{{ value_json.disk_use}}","unique_id":"dellups_sensor_disk_use","device":{"identifiers":["dellups_sensor"],"name":"dellupsSensors","model":"RPI dellups","manufacturer":"RPI"}, "icon":"mdi:microsd"}'
2020-06-26 10:24:29 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/dellups/dellupsMemoryUse/config (retained): b'{"name":"dellupsMemoryUse","state_topic":"tel/19c/dellups/state","unit_of_measurement":"%","value_template":"{{ value_json.memory_use}}","unique_id":"dellups_sensor_memory_use","device":{"identifiers":["dellups_sensor"],"name":"dellupsSensors","model":"RPI dellups","manufacturer":"RPI"}, "icon":"mdi:memory"}'
2020-06-26 10:24:29 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/dellups/dellupsCpuUsage/config (retained): b'{"name":"dellupsCpuUsage","state_topic":"tel/19c/dellups/state","unit_of_measurement":"%","value_template":"{{ value_json.cpu_usage}}","unique_id":"dellups_sensor_cpu_usage","device":{"identifiers":["dellups_sensor"],"name":"dellupsSensors","model":"RPI dellups","manufacturer":"RPI"}, "icon":"mdi:memory"}'
2020-06-26 10:24:29 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/dellups/dellupsSwapUsage/config (retained): b'{"name":"dellupsSwapUsage","state_topic":"tel/19c/dellups/state","unit_of_measurement":"%","value_template":"{{ value_json.swap_usage}}","unique_id":"dellups_sensor_swap_usage","device":{"identifiers":["dellups_sensor"],"name":"dellupsSensors","model":"RPI dellups","manufacturer":"RPI"}, "icon":"mdi:harddisk"}'
2020-06-26 10:24:29 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/dellups/dellupsPowerStatus/config (retained): b'{"name":"dellupsPowerStatus","state_topic":"tel/19c/dellups/state","value_template":"{{ value_json.power_status}}","unique_id":"dellups_sensor_power_status","device":{"identifiers":["dellups_sensor"],"name":"dellupsSensors","model":"RPI dellups","manufacturer":"RPI"}, "icon":"mdi:power-plug"}'
2020-06-26 10:24:29 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/dellups/dellupsLastBoot/config (retained): b'{"device_class":"timestamp","name":"dellupsLastBoot","state_topic":"tel/19c/dellups/state","value_template":"{{ value_json.last_boot}}","unique_id":"dellups_sensor_last_boot","device":{"identifiers":["dellups_sensor"],"name":"dellupsSensors","model":"RPI dellups","manufacturer":"RPI"}, "icon":"mdi:clock"}'
2020-06-26 10:24:29 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/dellups/dellupsLastMessage/config (retained): b'{"name":"dellupsLastMessage","state_topic":"tel/19c/dellups/state","value_template":"{{ value_json.updates}}","unique_id":"dellups_sensor_last_message","device":{"identifiers":["dellups_sensor"],"name":"dellupsSensors","model":"RPI dellups","manufacturer":"RPI"}, "icon":"mdi:clock-check"}'
2020-06-26 10:24:29 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/dellups/dellupsUpdates/config (retained): b'{"name":"dellupsUpdates","state_topic":"tel/19c/dellups/state","value_template":"{{ value_json.updates}}","unique_id":"dellups_sensor_updates","device":{"identifiers":["dellups_sensor"],"name":"dellupsSensors","model":"RPI dellups","manufacturer":"RPI"}, "icon":"mdi:cellphone-arrow-down"}'
2020-06-26 10:24:29 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/dellups/dellupsWifiStrength/config (retained): b'{"device_class":"signal_strength","name":"dellupsWifiStrength","state_topic":"tel/19c/dellups/state","unit_of_measurement":"dBm","value_template":"{{ value_json.wifi_strength}}","unique_id":"dellups_sensor_wifi_strength","device":{"identifiers":["dellups_sensor"],"name":"dellupsSensors","model":"RPI dellups","manufacturer":"RPI"}}'
2020-06-26 10:24:29 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/dellups/dellupsDiskUseDrive1/config (retained): b'{"name":"dellupsDiskUseDrive1","state_topic":"tel/19c/dellups/state","unit_of_measurement":"%","value_template":"{{ value_json.disk_use_drive1}}","unique_id":"dellups_sensor_disk_use_drive1","device":{"identifiers":["dellups_sensor"],"name":"dellupsSensors","model":"RPI dellups","manufacturer":"RPI"}, "icon":"mdi:harddisk"}'
2020-06-26 10:25:15 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to tel/19c/dellups/state
2020-06-26 10:25:15 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to tel/19c/dellups/state
2020-06-26 10:25:15 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to tel/19c/dellups/state
2020-06-26 10:25:15 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to tel/19c/dellups/state
2020-06-26 10:25:15 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to tel/19c/dellups/state
2020-06-26 10:25:15 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to tel/19c/dellups/state
2020-06-26 10:25:15 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to tel/19c/dellups/state
2020-06-26 10:25:16 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to tel/19c/dellups/state
2020-06-26 10:25:16 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to tel/19c/dellups/state
2020-06-26 10:25:16 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to tel/19c/dellups/state
2020-06-26 10:25:16 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to tel/19c/dellups/state
...
2020-06-26 10:26:10 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on tel/19c/dellups/state: b'{"temperature": 41.2, "disk_use": 19.8, "memory_use": 21.6, "cpu_usage": 2.3, "swap_usage": 20.0, "power_status": "Everything is working as intended", "last_boot": "2020-05-18T11:54:52+01:00", "last_message": "Fri Jun 26 10:26:06 2020", "updates": 11, "wifi_strength": , "disk_use_drive1": 52.9}'