Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mqtt.homeassistant] Request to correctly recognise HA convention Python capitalised Booleans in value templates #17903

Open
DigiH opened this issue Dec 14, 2024 · 0 comments
Labels
enhancement An enhancement or new feature for an existing add-on

Comments

@DigiH
Copy link

DigiH commented Dec 14, 2024

As discussed on the openHAB forum the only problematic issue left I am currently seeing is the HA required Python capitalised Booleans convention in value templates, which are currently failing, i. e.

Only working in Home Assistant:
“val_tpl”: “{% if value_json.get(‘unlocked’) is true -%}True{%- else -%}False{%- endif %}”

as this currently does not work in openHAB, but making them lower case breaks it in Home Assistant.

Only working in openHAB:
“val_tpl”: “{% if value_json.get(‘unlocked’) is true -%}true{%- else -%}false{%- endif %}”

Having the former also work in openHAB would nicely remove the need to have a separate setting for openHAB adjusted Home Assistant MQTT discovery.

Thanks

@DigiH DigiH added the enhancement An enhancement or new feature for an existing add-on label Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

No branches or pull requests

1 participant