Should using the custom option for schedular card work for set target_temp_hi and set target_temp_low? Here’s my script:
alias: Set climate Hall East
description: Sets climate parameters for scheduler-card
variables:
target_entity: climate.hall_east
sequence:
- data:
target_temp_high: "{{ hi_temperature }}"
target_temp_low: "{{ low_temperature }}"
target:
entity_id: "{{ target_entity }}"
action: climate.set_temperature
- delay:
seconds: 1
- target:
entity_id: "{{ target_entity }}"
data:
fan_mode: "{{ fan_mode }}"
action: climate.set_fan_mode
- delay:
seconds: 1
- target:
entity_id: "{{ target_entity }}"
data:
hvac_mode: "{{ hvac_mode }}"
action: climate.set_hvac_mode
mode: single
icon: mdi:air-conditioner
Here’s my card on the dashboard:
type: custom:scheduler-card
customize:
script.set_climate_hall_east:
actions:
- service: script.set_climate_hall_east
name: Set climate
icon: mdi:air-conditioner
variables:
hvac_mode:
name: HVAC mode
options:
- value: heat
icon: mdi:fire
- value: cool
icon: mdi:snowflake
- value: "off"
icon: mdi:power
target_temp_high:
name: Hi Temperature
min: 60
max: 80
target_temp_low:
name: Low Temperature
min: 60
max: 80
fan_mode:
name: Fan mode
options:
- value: auto
icon: mdi:fan-auto
- value: high
icon: mdi:fan-speed-3
- value: quiet
icon: mdi:fan-speed-1
time_step: 1
And here’s the error log once it runs:
Logger: homeassistant.core
Source: core.py:2814
First occurred: 10:10:00 AM (4 occurrences)
Last logged: 10:27:00 AM
Error executing service: <ServiceCall script.set_climate_livingroom (c:01JTXBXYA3YTX94MA3PWRCA6DP): hvac_mode=heat, target_temp_high=79, target_temp_low=66, fan_mode=auto, entity_id=['script.set_climate_livingroom']>
Error executing service: <ServiceCall script.set_climate_livingroom (c:01JTXC58PBVPJYWXJ38P32QBQP): hvac_mode=heat, target_temp_high=80, target_temp_low=60, fan_mode=auto, entity_id=['script.set_climate_livingroom']>
Error executing service: <ServiceCall script.set_climate_hall_east (c:01JTXCQSBYS7BJP3BV3YCHTMG7): hvac_mode=heat, target_temp_high=80, target_temp_low=60, fan_mode=auto, entity_id=['script.set_climate_hall_east']>
Error executing service: <ServiceCall script.set_climate_hall_east (c:01JTXCX2D2TKSN5447ANZGZH74): hvac_mode=heat, target_temp_high=80, target_temp_low=60, fan_mode=auto, entity_id=['script.set_climate_hall_east']>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/core.py", line 2814, in _run_service_call_catch_exceptions
await coro_or_task
File "/usr/src/homeassistant/homeassistant/core.py", line 2837, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 718, in _service_handler
response = await self._async_start_run(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
variables=service.data, context=service.context, wait=True
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 674, in _async_start_run
script_result = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 707, in _async_run
return await self.script.async_run(script_vars, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1827, in async_run
return await asyncio.shield(create_eager_task(run.async_run()))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 460, in async_run
await self._async_step(log_exceptions=False)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 526, in _async_step
self._handle_exception(
~~~~~~~~~~~~~~~~~~~~~~^
ex, continue_on_error, self._log_exceptions or log_exceptions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 556, in _handle_exception
raise exception
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 524, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1008, in _async_step_call_service
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<9 lines>...
)
^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 624, in _async_run_long_action
return await long_task
^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2759, in async_call
processed_data: dict[str, Any] = handler.schema(service_data)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/voluptuous/validators.py", line 259, in __call__
return self._exec((Schema(val) for val in self.validators), v)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/voluptuous/validators.py", line 386, in _exec
raise e if self.msg is None else AllInvalid(self.msg, path=path)
File "/usr/local/lib/python3.13/site-packages/voluptuous/validators.py", line 382, in _exec
v = func(v)
File "/usr/local/lib/python3.13/site-packages/voluptuous/schema_builder.py", line 205, in __call__
return self._compiled([], data)
~~~~~~~~~~~~~~^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/voluptuous/validators.py", line 256, in _run
return self._exec(self._compiled, value, path)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/voluptuous/validators.py", line 386, in _exec
raise e if self.msg is None else AllInvalid(self.msg, path=path)
File "/usr/local/lib/python3.13/site-packages/voluptuous/validators.py", line 384, in _exec
v = func(path, v)
File "/usr/local/lib/python3.13/site-packages/voluptuous/schema_builder.py", line 779, in validate_callable
return schema(data)
File "/usr/local/lib/python3.13/site-packages/voluptuous/schema_builder.py", line 205, in __call__
return self._compiled([], data)
~~~~~~~~~~~~~~^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/voluptuous/schema_builder.py", line 549, in validate_dict
return base_validate(path, data.items(), out)
File "/usr/local/lib/python3.13/site-packages/voluptuous/schema_builder.py", line 382, in validate_mapping
raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: expected float for dictionary value @ data['target_temp_high']
Could someone point me in the right direction? what am I missing? Should this even work? Thanks!!