Ensure the desired state value of sensor.waste_collection_bin is spelled correctly. For example, go to Developer Tools > States and check if the sensor’s state is Recycle or recycle.
EDIT
OK, there was a lot more to that automation than you initially posted …
I’ve edited the original post, but now I’ll explain a little better.
The whole script is noob (I manage), also it worked fine until I changed the light.turn_on part. The template is good, it works fine, however I think it’s my formatting, where does the data_template go and the entity_id?
Why is everything in that automation so terribly out of order?
Automations created with the Automation Editor usually sort everything in alphabetical order (which isn’t ideal but that’s another issue) but this isn’t even that.
Well, I tried giving it a restart, but I got a large error in the log and no restart.
SyntaxError: invalid syntax
2020-03-26 00:40:45 ERROR (MainThread) [homeassistant.core] Error executing service <ServiceCall homeassistant.restart (c:c1af35782661429db367bdc7950d662e)>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/core.py", line 1242, in _safe_execute
await self._execute_service(handler, service_call)
File "/usr/src/homeassistant/homeassistant/core.py", line 1257, in _execute_service
await handler.func(service_call)
File "/usr/src/homeassistant/homeassistant/components/hassio/__init__.py", line 264, in async_handle_core_service
errors = await conf_util.async_check_ha_config_file(hass)
File "/usr/src/homeassistant/homeassistant/config.py", line 804, in async_check_ha_config_file
res = await check_config.async_check_ha_config_file(hass)
File "/usr/src/homeassistant/homeassistant/helpers/check_config.py", line 121, in async_check_ha_config_file
component = integration.get_component()
File "/usr/src/homeassistant/homeassistant/loader.py", line 268, in get_component
cache[self.domain] = importlib.import_module(self.pkg_path)
File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 724, in exec_module
File "<frozen importlib._bootstrap_external>", line 860, in get_code
File "<frozen importlib._bootstrap_external>", line 791, in source_to_code
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/config/custom_components/plex_assistant/__init__.py", line 76
if aliases
^
SyntaxError: invalid syntax```
After copy-pasting the new automation, did you run Configuration Check? Answer: Yes, you did but it took longer than expected so you chose to restart Home Assistant.
It’s not necessary to restart Home Assistant to reload automations. Just use Configuration > Server Controls > Reload Automations.
The error message is mentioning something that doesn’t even exist in the automation posted above. It appears to be complaining about something in one of your custom components called plex_assistant.
Yeah, sorry when I said noob, I meant sh*t coder, I’ve been using HA for a few years, so have experience.
I ran the Configuration Checker, but it won’t ‘compete’ just spins, and I forgot about the reload Automations.
I see the error is in relation to the plex assistant that is in development, however it doesn’t show up if I remove the above automation.
Oh, ar*e. there’s nothing wrong with it, it just so happens that I’ve spent the last few hours trying to fix a problem with this automation when the problem was with a very recently updated plug-in.
Sorry to have wasted your time.
Just to rub it in, I’ve gone to my HACS page and there is an update for plex assistant.