Just add friendly names to those 3
FYI You can get around the jinja scope limitations with namespace.
{% set ns = namespace(my_items=[]) %}
{% for x in y %}
{% set ns.my_items = ns.my_items + [ 'adding item' ] %}
{% endfor %}
{{ ns.my_items }}
Just add friendly names to those 3
FYI You can get around the jinja scope limitations with namespace.
{% set ns = namespace(my_items=[]) %}
{% for x in y %}
{% set ns.my_items = ns.my_items + [ 'adding item' ] %}
{% endfor %}
{{ ns.my_items }}
ah, have seen that a few times, wondered what that was… assuming that makes the namespace ‘local scope’ anywhere within that YAML (but not shared / global with HA) ?
ok, it was broken but I fix it… formatting. looks like some of the spacing broke. wow intention programming is a nightmare, reminds me why I quit (my last language was early Python days, early 2000s)
here’s the working code (I hope!)…
Just use a text editor like notepad++ or vscode. Both replace tabs with spaces, you don’t even need to think about it.
There’s even a vscode addon.
I use Notepad++ daily. Is there a way to make it show the tabs? I’m saving the files as .YAML but dont see tab markers (I do, of course, in HA’s add-on editor)
NP++…
Settings → preferences → Language → Tab Size [ 4 ], check replace by space.
it’s this one
are you not running the latest version?
It seems I’m not
was on 8.7.7, just upped to v8.8.1 … same thing. they moved it looks like. My prior screenshot is it now
@petro the blueprint runs without error but I noticed this in the Log whenever I do a restart of the Automation YAML (Developer Tools)
Logger: homeassistant.components.automation
Source: components/automation/config.py:123
integration: Automation (documentation, issues)
First occurred: 8:33:27 AM (5 occurrences)
Last logged: 5:32:02 PM
Blueprint 'Offline Devices Report v16' generated invalid automation with inputs {'time': '04:00:00', 'exclude_entities': [], 'actions': [], 'exclude_domains': [], 'exclude_text_in_entity_id': 'BI5\njennifer', 'exclude_patterns': 'somfy*', 'debug_mode': True, 'notification_device': ['notify.mobile_app_s23'], 'mobile_notification_services': 'notify.mobile_app_s23', 'enable_persistent_notifications': True, 'enable_mobile_notifications': False, 'use_friendly_names': False, 'exclude_text': '*', 'exclude_strings': 'jennifer\ntapo\ndetection\nbattery\nshuffle\nrepeat\ndisturb', 'exclude_string': '*jennifer*,*echo*', 'list_format': 'both', 'format_option': 'entity_id'}: invalid template (TemplateSyntaxError: expected token ':', got '}') for dictionary value @ data['variables']['_offline_devices']. Got "{% set exclude_entities = exclude_entities if exclude_entities is list else [exclude_entities] %} {% set exclude_regex = exclude_strings.split('\\n') | map('trim') | reject('eq', '') | list | join('|') if exclude_strings is defined and exclude_strings else 'abcdefghijklmnopqrstuvwxyz' %} {% set entities = states | map(attribute='entity_id') | reject('search', 'cloud') | reject('in', exclude_entities) | reject('search', exclude_regex) | list %} {% set sensors = entities | select('search', '^(...
Blueprint 'Auto-Lock v26 - cgpt' generated invalid automation with inputs {'door_lock': 'lock.front_entry_deadbolt', 'door_sensor': 'binary_sensor.alarm_zone_1', 'bypass_entity': 'input_boolean.bypass_door_front', 'counter_variable': 'counter.door_lock_retries_frontdoor', 'enable_notification': True, 'notification_device': ['notify.mobile_app_s23'], 'global_conditions': [{'condition': 'not', 'conditions': [{'condition': 'state', 'entity_id': 'input_select.house_mode', 'state': 'Disarmed'}], 'enabled': False}], 'notify_on_retry': True, 'notify_on_lock': True, 'max_retries': 2, 'door_close_timeout': 1, 'enable_notifications': False, 'notification_service': 'notify.mobile_app_s23', 'enable_persistent_notification': True, 'persistent_notifications': True}: extra keys not allowed @ data['actions'][3]['then'][3]['choose'][2]['service']. Got 'lock.lock' extra keys not allowed @ data['actions'][3]['then'][3]['choose'][2]['target']. Got {'entity_id': '{{ door_lock }}'} required key not provided @ data['actions'][3]['then'][3]['choose'][2]['conditions']. Got None required key not provided @ data['actions'][3]['then'][3]['choose'][2]['sequence']. Got None
Blueprint 'Auto-Lock with Comprehensive Notification Controls' generated invalid automation with inputs {'door_lock': 'lock.front_entry_deadbolt', 'door_sensor': 'binary_sensor.alarm_zone_1', 'bypass_entity': 'input_boolean.bypass_door_front', 'counter_variable': 'counter.door_lock_retries_frontdoor', 'enable_notification': True, 'notification_device': 'notify.mobile_app_s23', 'global_conditions': [{'condition': 'not', 'conditions': [{'condition': 'state', 'entity_id': 'input_select.house_mode', 'state': 'Disarmed'}], 'enabled': False}], 'notify_on_retry': True, 'notify_on_lock': True, 'max_retries': 2, 'door_close_timeout': 3, 'enable_notifications': False, 'notification_service': 'notify.mobile_app_s23', 'enable_persistent_notification': True, 'persistent_notifications': True, 'verification_timeout': 1, 'persistent_notification': True, 'enable_persistent_notifications': True}: extra keys not allowed @ data['actions'][6]['default'][2]['choose'][1]['choose']. Got [{'conditions': [{'condition': 'template', 'value_template': '{{ notify_lock_success and enable_persistent_notifications }}'}], 'sequence': [{'service': 'persistent_notification.create', 'data': {'title': '✅ Lock Successful', 'message': "{{ state_attr(door_lock, 'friendly_name') }} is locked", 'notification_id': 'lock_success_{{ door_lock }}'}}]}] required key not provided @ data['actions'][6]['default'][2]['choose'][1]['conditions']. Got None required key not provided @ data['actions'][6]['default'][2]['choose'][1]['sequence']. Got None
Blueprint 'Auto-Lock with Reliable Notifications' generated invalid automation with inputs {'door_lock': 'lock.front_entry_deadbolt', 'door_sensor': 'binary_sensor.alarm_zone_1', 'bypass_entity': 'input_boolean.bypass_door_front', 'counter_variable': 'counter.door_lock_retries_frontdoor', 'enable_notification': True, 'notification_device': 'notify.mobile_app_s23', 'global_conditions': [{'condition': 'not', 'conditions': [{'condition': 'state', 'entity_id': 'input_select.house_mode', 'state': 'Disarmed'}], 'enabled': False}], 'notify_on_retry': True, 'notify_on_lock': True, 'max_retries': 1, 'door_close_timeout': 0.5, 'enable_notifications': False, 'notification_service': 'notify.mobile_app_s23', 'enable_persistent_notification': True, 'persistent_notifications': True, 'verification_timeout': 0.5, 'persistent_notification': True, 'enable_persistent_notifications': True, 'notify_monitoring_start': True, 'notify_timeout': True, 'notify_lock_success': True, 'notify_max_retries': True, 'enable_mobile_notifications': True}: expected a dictionary for dictionary value @ data['variables']. Got None
There’s a syntax error in one of the templates
there might have been a few… no way I was going to figure that out. DeepSeek and ChatGPT found them. DS could not fix, but CGPT looks like it might have.