Skip to content

Commit

Permalink
Update discovery.py
Browse files Browse the repository at this point in the history
Update discovery.py

Update discovery.py

Update discovery.py
  • Loading branch information
DigiH committed Jan 15, 2024
1 parent 08a80b5 commit a2dd77d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion TheengsGateway/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ def publish_device_info(self, pub_device) -> None: # noqa: ANN001
device["name"] = pub_device["model_id"] + "-" + k
device["uniq_id"] = pub_device_uuid + "-" + k
if k == "unlocked":
device["val_tpl"] = "{% if value_json.get('unlocked') is true -%}True{%- else -%}False{%- endif %}" # noqa: E501
device[
"val_tpl"
] = "{% if value_json.get('unlocked') is true -%}True{%- else -%}False{%- endif %}" # noqa
elif self.configuration["hass_discovery"]:
device["val_tpl"] = "{{ value_json." + k + " | is_defined }}"
else:
Expand Down

0 comments on commit a2dd77d

Please sign in to comment.