Merge pull request #58 from CFenner/patch-6
Use default values for sensor
This commit is contained in:
@@ -300,9 +300,7 @@ def config_json(what_config):
|
|||||||
data["title"] = "Device Update"
|
data["title"] = "Device Update"
|
||||||
data["device_class"] = "update"
|
data["device_class"] = "update"
|
||||||
data["state_class"] = "measurement"
|
data["state_class"] = "measurement"
|
||||||
data["payload_on"] = "on"
|
data["value_template"] = "{{ 'ON' if value_json.installed_ver != value_json.new_ver else 'OFF' }}"
|
||||||
data["payload_off"] = "off"
|
|
||||||
data["value_template"] = "{{ 'on' if value_json.installed_ver != value_json.new_ver else 'off' }}"
|
|
||||||
elif what_config == "update":
|
elif what_config == "update":
|
||||||
version = check_git_version(script_dir).strip()
|
version = check_git_version(script_dir).strip()
|
||||||
data["icon"] = "mdi:update"
|
data["icon"] = "mdi:update"
|
||||||
|
|||||||
Reference in New Issue
Block a user