Hi Everyone,
At the beginning I would like to thanks (@roschi) for such great work
This is my very beginning with Home Assistant, Schedy and python so please be gentle.
I’ve successfully configured Schedy with thermostat actors.
No I’m trying to use generic actor without success.
I’ve got the following error message:
2019-01-30 22:39:03.403069 ERROR PurifierOnOff: !!! [R:Purifier] [A:fan.xiaomi_air_purifier_salon] The value ('on',) has not the expected number of items (0)
My configuration looks as below:
PurifierOnOff:
module: hass_apps_loader
class: SchedyApp
debug: true
actor_type: generic
actor_templates:
generic:
attributes:
- attribute: "state"
values:
'off':
service: "fan/turn_off"
'on':
service: "fan/turn_on"
watched_entities:
- "input_boolean.away"
rooms:
living:
friendly_name: Purifier
actors:
fan.xiaomi_air_purifier_salon:
schedule:
- v: 'on'
rules:
# don't turn on when 'Off' mode is selected
- x: "Break() if state('input_select.purifier_mode') == 'Off' else Skip()"
# don't turn on when 'away' mode is selected
- x: "Break() if is_on('input_boolean.away') else Skip()"
# don't turn on when pm2.5 < 10
- x: "Break() if float(state('sensor.salon_pm25') or 0.0) < 10.0 else Skip()"
# on weekends and holidays
- rules:
- x: "Skip() if is_on('input_boolean.holidays') else Break()"
weekdays: "!6-7"
- { start: "00:00", end: "00:00" }
# on normal working days, turn on from 14:30 to 7:00
- weekdays: 1-5
rules:
- { start: "14:30", end: "07:00" }
# on weekends
- weekdays: 6-7
- v: 'off'
rules:
# don't turn off when 'Auto' mode is selected
- x: "Break() if state('input_select.purifier_mode') == 'Auto' else Skip()"
# don't turn off when 'Silent' mode is selected
- x: "Break() if state('input_select.purifier_mode') == 'Silent' else Skip()"
# don't turn on when pm2.5 > 5
- x: "Break() if state('input_select.purifier_mode') == 'Silent' and float(state('sensor.salon_pm25') or 0.0) > 5.0 else Skip()"
- weekdays: 1-7
watched_entities:
- "sensor.salon_pm25"
- "input_select.purifier_mode"
- "input_boolean.holidays"
The question is: what is wrong with configuration? Am I missing something? I read the documentation and I’m not sure what else I have to do.
BR,
Seba
EDIT: Ok, I’ve found the error. In actor_template section I have to use “default” instead of generic. Thanks again for great work.