Hi,
I am trying to run an automation that turns the heat on if outside temp is lower than 50. I get the following in my logs.
Logger: homeassistant.components.automation.if_outside_temp_is_less_than_50_degrees_turn_on_heat
Source: helpers/config_validation.py:142
Integration: Automation (documentation, issues)
First occurred: 7:20:33 PM (2 occurrences)
Last logged: 7:20:33 PM
- If outside temp is less than 50 degrees turn on heat: Error executing script. Unexpected error for call_service at pos 1: sequence item 0: expected str instance, Optional found
- While executing automation automation.if_outside_temp_is_less_than_50_degrees_turn_on_heat
Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 262, in _async_step await getattr( File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 463, in _async_call_service_step await service_task File “/usr/src/homeassistant/homeassistant/core.py”, line 1442, in async_call processed_data = handler.schema(service_data) File “/usr/local/lib/python3.8/site-packages/voluptuous/validators.py”, line 218, in call return self._exec((Schema(val) for val in self.validators), v) File “/usr/local/lib/python3.8/site-packages/voluptuous/validators.py”, line 337, in _exec v = func(v) File “/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py”, line 272, in call return self._compiled([], data) File “/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py”, line 817, in validate_callable return schema(data) File “/usr/src/homeassistant/homeassistant/helpers/config_validation.py”, line 142, in validate raise vol.Invalid(“must contain at least one of {}.”.format(", ".join(keys))) TypeError: sequence item 0: expected str instance, Optional found
And here is automation. Any thoughts?
- id: '1616456524234'
alias: If outside temp is less than 50 degrees turn on heat
description: ''
trigger:
- platform: numeric_state
entity_id: sensor.dark_sky_temperature
below: '50'
condition: []
action:
- service: climate.set_hvac_mode
data:
hvac_mode: heat
mode: single