#automations not working
1 messages · Page 1 of 1 (latest)
Please use a code share site to share code or logs, for example:
- http://pastie.org/ (select YAML for the language)
- https://dpaste.org/ (select YAML for the language)
- https://paste.debian.net/ (you guessed it, select YAML as the language)
Please don't use Pastebin, since it can randomly add spaces to the main view. Please also don't share text as images since it makes it harder for people to help you. Remember that others may have colour blindness, impaired vision, etc.
Share the automation ☝️
Logger: aiohttp.server
Source: components/config/automation.py:70
First occurred: 17:17:19 (5 occurrences)
Last logged: 18:29:24
Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
resp = await request_handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 81, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/init.py", line 145, in post
self._write_value(hass, current, config_key, data)
File "/usr/src/homeassistant/homeassistant/components/config/automation.py", line 70, in _write_value
cur_value[CONF_ID] = uuid.uuid4().hex
TypeError: 'str' object does not support item assignment
i cant
At all?
Do you have a file called automations.yaml in your configuration folder?
checked the config !automation is in there
Do you have
automation: !include automations.yaml
``` in `configuration.yaml`?
automation: !include automations.yaml
yes
batteryon:
- trigger:
- platform: numeric_state
entity_id: sensor.strom_dg_aktuell
above: 0
action:
- service:
type: turn_on
#entity_id: switch.manual_control_the_load
device_id: 79316d9a5516786bb1b954a8ad0e112a
entity_id: switch.manual_control_the_load
domain: switch
batteryoff:
- trigger:
- platform: numeric_state
entity_id: sensor.strom_dg_aktuell
below: -1
action:
- service:
type: turn_off
entity_id: switch.manual_control_the_load
domain: switch
- HAOS
ha core check - Container uses
dockercommands - Core requires you to activate the venv first
what is that?
That's what I want to know about that "yaml" you posted
Is that a copy and paste from automations.yaml?
yes
Well... I hate to tell you this, but you've fucked up there
No wonder HA is unhappy
what is missing ???
Wrong question
There's nothing right about it
Remove the contents, replace with just
[]
The editor should work again
okey so in need 2023.1.4 Home assistant core?
What?
do i need a core update?
okey
You've thrown in some very broken YAML and invalid content
Once you un-fuck that file the UI editor will work again
https://www.home-assistant.io/docs/automation/yaml/#yaml-example shows you what valid YAML should look like, though the content of that file is different from what's shown there
ok thx i try
Also, any time you edit YAML, use #1064235219617599580 message
thx mate now it is working flawlessly