Handle device reg fields not being valid data in openai conversion (#88047)

Handle device reg fields not being valid data
This commit is contained in:
Paulus Schoutsen 2023-02-14 05:45:27 -05:00 committed by GitHub
parent 1431979eab
commit fa5c60c9ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 3 deletions

View file

@ -14,7 +14,7 @@ An overview of the areas and the devices in this smart home:
{{ area.name }}:
{%- set area_info.printed = true %}
{%- endif %}
- {{ device_attr(device, "name") }}{% if device_attr(device, "model") and device_attr(device, "model") not in device_attr(device, "name") %} ({{ device_attr(device, "model") }}){% endif %}
- {{ device_attr(device, "name") }}{% if device_attr(device, "model") and (device_attr(device, "model") | string) not in (device_attr(device, "name") | string) %} ({{ device_attr(device, "model") }}){% endif %}
{%- endif %}
{%- endfor %}
{%- endfor %}