diff --git a/src/rpi-cpu2mqtt.py b/src/rpi-cpu2mqtt.py index afa71b6..05b6f61 100644 --- a/src/rpi-cpu2mqtt.py +++ b/src/rpi-cpu2mqtt.py @@ -303,9 +303,7 @@ def config_json(what_config): data["title"] = "Device Update" data["device_class"] = "update" data["state_class"] = "measurement" - data["payload_on"] = "on" - data["payload_off"] = "off" - data["value_template"] = "{{ 'on' if value_json.installed_ver != value_json.new_ver else 'off' }}" + data["value_template"] = "{{ 'ON' if value_json.installed_ver != value_json.new_ver else 'OFF' }}" elif what_config == "update": version = check_git_version(script_dir).strip() data["icon"] = "mdi:update" @@ -598,4 +596,4 @@ if __name__ == '__main__': sys.exit(0) time.sleep(1) # Check the exit flag every second else: - gather_and_send_info() \ No newline at end of file + gather_and_send_info()