Heaty will die, Schedy be born!

I’m working on a cover generic actor at the moment, on Schedy 0.6.0. Do you think your new generic actor would make sense? If so I’d like to try please.

It definitely makes sense since that new generic actor (named generic2) will be the one for which development will go on in the future. However, the API details aren’t fully worked out yet, so it’s not even included in the development version of Schedy. I’ll try to come up with something tomorrow, but can’t give a promise. Documentation will take even longer to be written.

Well, without doc I may have some difficulties. But as soon as there is little doc, I’ll be willing to test.

Here are my covers:

  actor_type: generic
  actor_templates:
    default:
      template: cover
    cover:
      attributes:
        - attribute: state
          values:
            "open":
              service: cover.open_cover
              service_data: {}
              include_entity_id: true
              value_parameter: null
            "closed":
              service: cover.close_cover
              service_data: {}
              include_entity_id: true
              value_parameter: null
      short_values:
        - ['closed']
        - ['open']
      send_retries: 3

If some one need schedule, please ask. It’s dynamic: a “day” boolean, and no rain plus sun elevation conditions.

I’m strugling extracting a parameter from a sensor:

'on': true
temperature: 25
orientation:
  - 6
  - 1
  - 84
tiltangle: 78
vibrationstrength: 201
friendly_name: Vibration Sensor
device_class: motion

I need to compare the second orientation attribute with a threshold…
If it were a single attribute, I would do this:

- x: "Abort() if float(state('binary_sensor.velux_vibration','orientation')  > 3 else Next()"

Here is the template:

{{ state_attr('binary_sensor.velux_vibration','orientation') }}

result:

[7, 1, -83]

Any idea/tips/guidance please?

:slight_smile:

Your actor template looks good. However you don’t need short_values at all in your case.

Regarding the orientation parameter (which is a list of three items), you can access the second list item like so, just normal Python indexing syntax:

- x: "Abort() if state('binary_sensor.velux_vibration', 'orientation')[1] > 3 else Next()"
1 Like

Just an update on the generic2 actor: I couldn’t finish it yet, will probably have time on Wednesday or next weekend.

1 Like

Hi,

Working perfectly!
Thank you :slight_smile:

First and foremost thank you for your great work!

I recently experienced a problem in my heating schedule. Sometimes the schedule seems to be overwritten by manual input although I am certain that there was no manual input.

Here is a description of the latest incident: My livingroom heating is scheduled to turn from 21 to 17°C at 15:00 if no one is at home. That happens, but after 20sec a manual change to 21°C is registered. You find a log attached.

My feeling is that the thermostats react too slowly so that the change is not yet being registered and the thermostat reports the old value of 21 which is then registered as a manual change. Could that be? If so, can I do something about it? And if not, where should I look for the culprit?

Best regards

2019-11-20 15:00:00.867124 INFO schedy_heating: --- [R:living] Unchanged HA state: state='17.0', attributes={'actor_wanted_values': {'climate.thermostat_wz': '17.0', 'climate.thermostat_ez': '17.0'}, 'scheduled_value': '17.0', 'rescheduling_time': None, 'overlay_active': False}
2019-11-20 15:00:01.541282 INFO schedy_heating: --> [R:living] [A:climate.thermostat_ez] Attribute 'state' is 'auto'.
2019-11-20 15:00:01.544765 INFO schedy_heating: --> [R:living] [A:climate.thermostat_ez] Attribute 'temperature' is 17.0.
2019-11-20 15:00:01.548782 INFO schedy_heating: --> [R:living] [A:climate.thermostat_ez] Attribute 'current_temperature' is 18.7.
2019-11-20 15:00:01.551640 INFO schedy_heating: --- [R:living] Unchanged HA state: state='17.0', attributes={'actor_wanted_values': {'climate.thermostat_wz': '17.0', 'climate.thermostat_ez': '17.0'}, 'scheduled_value': '17.0', 'rescheduling_time': None, 'overlay_active': False}
2019-11-20 15:00:01.715818 INFO schedy_heating: --> [R:living] [A:climate.thermostat_wz] Attribute 'state' is 'auto'.
2019-11-20 15:00:01.719330 INFO schedy_heating: --> [R:living] [A:climate.thermostat_wz] Attribute 'temperature' is 17.0.
2019-11-20 15:00:01.731184 INFO schedy_heating: --> [R:living] [A:climate.thermostat_wz] Attribute 'current_temperature' is 19.4.
2019-11-20 15:00:01.734874 INFO schedy_heating: --- [R:living] Unchanged HA state: state='17.0', attributes={'actor_wanted_values': {'climate.thermostat_wz': '17.0', 'climate.thermostat_ez': '17.0'}, 'scheduled_value': '17.0', 'rescheduling_time': None, 'overlay_active': False}
2019-11-20 15:00:20.034958 INFO schedy_heating: --> [R:living] [A:climate.thermostat_wz] Attribute 'state' is 'auto'.
2019-11-20 15:00:20.038370 INFO schedy_heating: --> [R:living] [A:climate.thermostat_wz] Attribute 'temperature' is 21.0.
2019-11-20 15:00:20.042126 INFO schedy_heating: --> [R:living] [A:climate.thermostat_wz] Attribute 'current_temperature' is 19.4.
2019-11-20 15:00:20.046083 INFO schedy_heating: --> [R:living] [A:climate.thermostat_wz] Received value of 21.0��.
2019-11-20 15:00:20.050004 INFO schedy_heating: --- [R:living] Propagating the change to all actors in the room.
2019-11-20 15:00:20.060462 INFO schedy_heating: --- [R:living] Setting value to 21.0��.  [manual]
2019-11-20 15:00:20.063870 INFO schedy_heating: --- [R:living] [A:climate.thermostat_wz] Not sending value 21.0�� redundantly.
2019-11-20 15:00:20.069516 INFO schedy_heating: <-- [R:living] [A:climate.thermostat_ez] Setting value 21.0�� (left tries = 10).
2019-11-20 15:00:20.073120 INFO schedy_heating: <-- [R:living] [A:climate.thermostat_ez] Setting temperature = 21.0��, HVAC mode = 'auto'.
2019-11-20 15:00:20.137118 INFO schedy_heating: --- [R:living] [A:climate.thermostat_ez] Re-sending in 30 seconds.
2019-11-20 15:00:20.156675 INFO schedy_heating: <-- [R:living] Value set to 21.0��.  [manual]
2019-11-20 15:00:20.160177 INFO schedy_heating: --- [R:living] Re-applying the schedule not before 17:00:19 (in 2:00:00).
2019-11-20 15:00:20.163342 INFO schedy_heating: <-- [R:living] Sending state to HA: state='21.0', attributes={'actor_wanted_values': {'climate.thermostat_wz': '21.0', 'climate.thermostat_ez': '21.0'}, 'scheduled_value': '17.0', 'rescheduling_time': 1574265619.397985, 'overlay_active': False}
2019-11-20 15:00:20.263272 INFO schedy_heating: --> [R:living] [A:climate.thermostat_ez] Attribute 'state' is 'auto'.
2019-11-20 15:00:20.266180 INFO schedy_heating: --> [R:living] [A:climate.thermostat_ez] Attribute 'temperature' is 21.0.
2019-11-20 15:00:20.268813 INFO schedy_heating: --> [R:living] [A:climate.thermostat_ez] Attribute 'current_temperature' is 18.7.
2019-11-20 15:00:20.271594 INFO schedy_heating: --- [R:living] [A:climate.thermostat_ez] Cancelled re-sending timer.
2019-11-20 15:00:20.273941 INFO schedy_heating: --> [R:living] [A:climate.thermostat_ez] Received value of 21.0��.
2019-11-20 15:00:20.276545 INFO schedy_heating: --- [R:living] Unchanged HA state: state='21.0', attributes={'actor_wanted_values': {'climate.thermostat_wz': '21.0', 'climate.thermostat_ez': '21.0'}, 'scheduled_value': '17.0', 'rescheduling_time': 1574265619.397985, 'overlay_active': False}

Edit: Happened again today. This time 16min after setting the temp to 17°C. I can confirm that there was no manual input changing the value. I am baffled because my previous hypothesis seems to be false.

Hi People. I tried setting this up but I could never get this working. I post my complete config here. Maybe there’s someone out there who could point me to the right direction? My AC Just won’t turn on I also added a log file to see what shedy does

shedy_heating:
  module: hass_apps_loader
  class: SchedyApp

  debug: true

  actor_type: thermostat

  expression_environment: |
    def heating_mode():
        return state("input_select.heating_mode")

  schedule_prepend:
  - x: "Mark(OFF, Mark.OVERLAY) if not is_empty(filter_entities('binary_sensor', window_room=room_name, state='on')) else Next()"
  - name: global schedule on/off switch
    x: "Abort() if is_off('input_boolean.automated_heating') else Next()"
  - name: per-room schedule on/off switch
    x: "Abort() if is_off('input_boolean.automated_heating_' + room_name) else Next()"



  schedule_append:
  - v: "OFF"
  
  schedule_snippets:
  # BEDROOM
    bedroom:
    - v: 24
      rules:
      # don't turn on when it's > 20 degrees in the bedroom
      - x: "Break() if float(state('sensor.temperature_bedroom') or 0) > 25 else Next()"
      - weekdays: 1-5
        rules:
        - rules:
          - x: "Next() if heating_mode() != 'Normal' else Break()"
          - { start: "06:00", end: "07:00" }
          - { start: "21:00", end: "23:59" }

      - weekdays: 6-7
        rules:
        - { start: "06:00", end: "07:00" }
        - { start: "22:00", end: "23:59" }

# ROOM EVAN
    room_evan:
    - v: 21
      rules:
      # don't turn on when it's > 20 degrees in the bedroom
      - x: "Break() if float(state('sensor.xiaomi_mijia_temperature_evan') or 0) > 25 else Next()"
      - weekdays: 1-5
        rules:
        - rules:
          - x: "Next() if heating_mode() != 'Normal' else Break()"
          - { start: "06:00", end: "07:00" }
          - { start: "21:00", end: "22:30" }

      - weekdays: 6-7
        rules:
        - { start: "08:00", end: "09:00" }
        - { start: "21:00", end: "22:30" }

# ROOM ROSE 
    room_rose:
    - v: 21
      rules:
      # don't turn on when it's > 20 degrees in the bedroom
      - x: "Break() if float(state('sensor.xiaomi_mijia_temperature_rose') or 0) > 22 else Next()"
      - weekdays: 1-5
        rules:
        - rules:
          - x: "Next() if heating_mode() != 'Normal' else Break()"
          - { start: "06:00", end: "07:00" }
          - { start: "03:00", end: "04:00" }
          - { start: "20:00", end: "21:30" }

      - weekdays: 6-7
        rules:
        - { start: "06:00", end: "07:30" }
        - { start: "03:00", end: "04:00" }
        - { start: "21:00", end: "22:30" }


  watched_entities:
  - input_select.heating_mode
  - input_boolean.automated_heating
  - sensor.temperature_bedroom
  - sensor.xiaomi_mijia_temperature_evan
  - sensor.xiaomi_mijia_temperature_rose
  - input_boolean.automated_heating_bedroom
  - input_boolean.automated_room_evan
  - input_boolean.automated_room_rose

  rooms:
# BEDROOM
    bedroom:
      rescheduling_delay: 15
      actors:
        climate.air_conditioner_bedroom:
      watched_entities:
      - sensor.temperature_bedroom
      - binary_sensor.window_bedroom
      - input_boolean.automated_heating_bedroom
      schedule:
      - x: "IncludeSchedule(schedule_snippets['bedroom'])"
# ROOM EVAN
    room_evan:
      rescheduling_delay: 15
      actors:
        climate.air_conditioner_evan:
      watched_entities:
      - sensor.xiaomi_mijia_temperature_evan
      - binary_sensor.window_evan
      - input_boolean.automated_heating_room_evan
      schedule:
      - x: "IncludeSchedule(schedule_snippets['room_evan'])"
# ROOM ROSE
    room_rose:
      rescheduling_delay: 15
      actors:
        climate.air_conditioner_rose:
      watched_entities:
      - sensor.xiaomi_mijia_temperature_rose
      - binary_sensor.window_rose
      - input_boolean.automated_heating_room_rose
      schedule:
      - x: "IncludeSchedule(schedule_snippets['room_rose'])"


  statistics:
    # Pick an arbitrary name for the parameter instance.
    upstairs_temp_delta:
      # The type of parameter as found in the actor'S documentation.
      type: temp_delta
      # More parameter-specific settings:
      rooms:
        bedroom:
        room_evan:
        room_rose:

Here a log when deactivating automated heating in the bedroom and re-activating it.

2019-11-21 21:59:20.249831 INFO shedy_heating: --- [R:bedroom] Final result: OFF, markers: set()
2019-11-21 21:59:20.252442 INFO shedy_heating: --- [R:bedroom] Result didn't change, not setting it again.
2019-11-21 21:59:20.254618 INFO shedy_heating: --- [R:room_evan] Unchanged HA state: state='OFF', attributes={'actor_wanted_values': {'climate.air_conditioner_evan': 'OFF'}, 'scheduled_value': 'OFF', 'rescheduling_time': None, 'overlay_active': False}
2019-11-21 21:59:20.255485 INFO shedy_heating: --- [R:bedroom] Unchanged HA state: state='OFF', attributes={'actor_wanted_values': {'climate.air_conditioner_bedroom': 'OFF'}, 'scheduled_value': 'OFF', 'rescheduling_time': None, 'overlay_active': False}
2019-11-21 21:59:21.937606 INFO shedy_heating: --- [SP:upstairs_temp_delta] Value for A:climate.air_conditioner_bedroom in R:bedroom is 0.0.
2019-11-21 21:59:21.939977 INFO shedy_heating: --- [SP:upstairs_temp_delta] Value for A:climate.air_conditioner_evan in R:room_evan is 0.0.
2019-11-21 21:59:21.942074 INFO shedy_heating: --- [SP:upstairs_temp_delta] Value for A:climate.air_conditioner_rose in R:room_rose is 0.0.
2019-11-21 21:59:21.943927 INFO shedy_heating: --- [SP:upstairs_temp_delta] Unchanged HA state: attributes={'min': 0.0, 'avg': 0.0, 'max': 0.0}
2019-11-21 21:59:40.856388 INFO shedy_heating: --> Attribute 'state' of 'input_boolean.automated_heating_bedroom' changed from 'on' to 'off', reevaluating 3 rooms.
2019-11-21 21:59:40.858562 INFO shedy_heating: --- [R:bedroom] Doing schedule re-evaluation in 1 second [reset=False]
2019-11-21 21:59:40.860663 INFO shedy_heating: --> Attribute 'state' of 'input_boolean.automated_heating_bedroom' changed from 'on' to 'off', reevaluating <Room R:bedroom>.
2019-11-21 21:59:40.863566 INFO shedy_heating: --- [R:bedroom] Re-evaluation pending, doing nothing.

2019-11-21 21:59:40.948176 INFO shedy_heating: --- [R:bedroom] Evaluating room's schedule (reset=False, force_resend=False).
2019-11-21 21:59:40.949648 INFO shedy_heating: --- [R:bedroom] Assuming it to be 2019-11-21 21:59:40.933216.
2019-11-21 21:59:40.952721 INFO shedy_heating: --- [R:room_evan] Evaluating room's schedule (reset=False, force_resend=False).
2019-11-21 21:59:40.954458 INFO shedy_heating: --- [R:room_rose] Assuming it to be 2019-11-21 21:59:40.933216.
2019-11-21 21:59:40.957370 INFO shedy_heating: --- [R:bedroom] ������ [SUB]  <<Schedule 'bedroom'>/1:<Rule with sub <Schedule 'prepend'>>>
2019-11-21 21:59:40.959994 INFO shedy_heating: --- [R:bedroom]     ������ [ACT]  <<Schedule 'bedroom'>/1/1:<Rule x='Mark(OFF, Mark.OVERLAY) if not is_empty('...>>
2019-11-21 21:59:40.960583 INFO shedy_heating: --- [R:room_evan] Assuming it to be 2019-11-21 21:59:40.933216.
2019-11-21 21:59:40.964598 INFO shedy_heating: --- [R:room_evan] ������ [SUB]  <<Schedule 'room_evan'>/1:<Rule with sub <Schedule 'prepend'>>>
2019-11-21 21:59:40.961416 INFO shedy_heating: --- [R:room_rose] ������ [SUB]  <<Schedule 'room_rose'>/1:<Rule with sub <Schedule 'prepend'>>>
2019-11-21 21:59:40.971256 INFO shedy_heating: --- [R:room_evan]     ������ [ACT]  <<Schedule 'room_evan'>/1/1:<Rule x='Mark(OFF, Mark.OVERLAY) if not is_empty('...>>
2019-11-21 21:59:40.972021 INFO shedy_heating: --- [R:bedroom] Initializing expression helper: BasicHelper, order = 0
2019-11-21 21:59:40.972368 INFO shedy_heating: --- [R:room_rose]     ������ [ACT]  <<Schedule 'room_rose'>/1/1:<Rule x='Mark(OFF, Mark.OVERLAY) if not is_empty('...>>
2019-11-21 21:59:40.978791 INFO shedy_heating: --- [R:room_evan] Initializing expression helper: BasicHelper, order = 0
2019-11-21 21:59:40.980322 INFO shedy_heating: --- [R:bedroom] Initializing expression helper: PatternHelper, order = 0
2019-11-21 21:59:40.981255 INFO shedy_heating: --- [R:room_rose] Initializing expression helper: BasicHelper, order = 0
2019-11-21 21:59:40.987201 INFO shedy_heating: --- [R:room_evan] Initializing expression helper: PatternHelper, order = 0
2019-11-21 21:59:40.996685 INFO shedy_heating: --- [R:bedroom] Initializing expression helper: ScheduleHelper, order = 0
2019-11-21 21:59:40.997580 INFO shedy_heating: --- [R:room_rose] Initializing expression helper: PatternHelper, order = 0
2019-11-21 21:59:40.999755 INFO shedy_heating: --- [R:room_evan] Initializing expression helper: ScheduleHelper, order = 0
2019-11-21 21:59:41.003196 INFO shedy_heating: --- [R:bedroom] Initializing expression helper: StateHelper, order = 0
2019-11-21 21:59:41.004346 INFO shedy_heating: --- [R:room_rose] Initializing expression helper: ScheduleHelper, order = 0
2019-11-21 21:59:41.009746 INFO shedy_heating: --- [R:room_rose] Initializing expression helper: StateHelper, order = 0
2019-11-21 21:59:41.007060 INFO shedy_heating: --- [R:bedroom] Initializing expression helper: ThermostatExpressionHelper, order = 0
2019-11-21 21:59:41.012989 INFO shedy_heating: --- [R:room_rose] Initializing expression helper: ThermostatExpressionHelper, order = 0
2019-11-21 21:59:41.016175 INFO shedy_heating: --- [R:bedroom] Initializing expression helper: CustomEnvironmentHelper, order = 1000
2019-11-21 21:59:41.022005 INFO shedy_heating: --- [R:bedroom] Executing the expression_environment script.
2019-11-21 21:59:41.018159 INFO shedy_heating: --- [R:room_evan] Initializing expression helper: StateHelper, order = 0
2019-11-21 21:59:41.032787 INFO shedy_heating: --- [R:room_evan] Initializing expression helper: ThermostatExpressionHelper, order = 0
2019-11-21 21:59:41.037987 INFO shedy_heating: --- [R:bedroom]     ������ => Next()
2019-11-21 21:59:41.040036 INFO shedy_heating: --- [R:bedroom]     ������ [ACT]  <<Schedule 'bedroom'>/1/2:<Rule x="Abort() if is_off('input_boolean.automat"...>>
2019-11-21 21:59:41.041631 INFO shedy_heating: --- [R:bedroom]     ������ => Next()
2019-11-21 21:59:41.043000 INFO shedy_heating: --- [R:room_rose] Initializing expression helper: CustomEnvironmentHelper, order = 1000
2019-11-21 21:59:41.046486 INFO shedy_heating: --- [R:room_evan] Initializing expression helper: CustomEnvironmentHelper, order = 1000
2019-11-21 21:59:41.049156 INFO shedy_heating: --- [R:room_evan] Executing the expression_environment script.
2019-11-21 21:59:41.059355 INFO shedy_heating: --- [R:room_rose] Executing the expression_environment script.
2019-11-21 21:59:41.082750 INFO shedy_heating: --- [R:bedroom]     ������ [ACT]  <<Schedule 'bedroom'>/1/3:<Rule x="Abort() if is_off('input_boolean.automat"...>>
2019-11-21 21:59:41.084203 INFO shedy_heating: --- [R:room_rose]     ������ => Next()
2019-11-21 21:59:41.093135 INFO shedy_heating: --- [R:room_evan]     ������ => Next()
2019-11-21 21:59:41.097873 INFO shedy_heating: --- [R:bedroom]     ������ => Abort()
2019-11-21 21:59:41.100421 INFO shedy_heating: --- [R:bedroom] Found no result.
2019-11-21 21:59:41.102953 INFO shedy_heating: --- [R:room_rose]     ������ [ACT]  <<Schedule 'room_rose'>/1/2:<Rule x="Abort() if is_off('input_boolean.automat"...>>
2019-11-21 21:59:41.105434 INFO shedy_heating: --- [R:room_evan]     ������ [ACT]  <<Schedule 'room_evan'>/1/2:<Rule x="Abort() if is_off('input_boolean.automat"...>>
2019-11-21 21:59:41.108188 INFO shedy_heating: --- [R:room_evan]     ������ => Next()
2019-11-21 21:59:41.110330 INFO shedy_heating: --- [R:room_rose]     ������ => Next()
2019-11-21 21:59:41.112671 INFO shedy_heating: --- [R:room_rose]     ������ [ACT]  <<Schedule 'room_rose'>/1/3:<Rule x="Abort() if is_off('input_boolean.automat"...>>
2019-11-21 21:59:41.122261 INFO shedy_heating: --- [R:bedroom] No suitable value found in schedule.
2019-11-21 21:59:41.124604 INFO shedy_heating: --- [R:bedroom] Unchanged HA state: state='OFF', attributes={'actor_wanted_values': {'climate.air_conditioner_bedroom': 'OFF'}, 'scheduled_value': 'OFF', 'rescheduling_time': None, 'overlay_active': False}
2019-11-21 21:59:41.131910 INFO shedy_heating: --- [R:room_evan]     ������ [ACT]  <<Schedule 'room_evan'>/1/3:<Rule x="Abort() if is_off('input_boolean.automat"...>>
2019-11-21 21:59:41.134408 INFO shedy_heating: --- [R:room_evan]     ������ => Next()
2019-11-21 21:59:41.136565 INFO shedy_heating: --- [R:room_evan] ������ [SUB]  <<Schedule 'room_evan'>/2:<Rule with sub <Schedule 'room-individual'>>>
2019-11-21 21:59:41.139367 INFO shedy_heating: --- [R:room_rose]     ������ => Next()
2019-11-21 21:59:41.143937 INFO shedy_heating: --- [R:room_rose] ������ [SUB]  <<Schedule 'room_rose'>/2:<Rule with sub <Schedule 'room-individual'>>>
2019-11-21 21:59:41.146772 INFO shedy_heating: --- [R:room_rose]     ������ [ACT]  <<Schedule 'room_rose'>/2/1:<Rule x="IncludeSchedule(schedule_snippets['room_"...>>
2019-11-21 21:59:41.149942 INFO shedy_heating: --- [R:room_evan]     ������ [ACT]  <<Schedule 'room_evan'>/2/1:<Rule x="IncludeSchedule(schedule_snippets['room_"...>>
2019-11-21 21:59:41.153961 INFO shedy_heating: --- [R:room_evan]     ������ => IncludeSchedule(<Schedule 'room_evan'>)
2019-11-21 21:59:41.156848 INFO shedy_heating: --- [R:room_evan]     ������ [SUB]  <<Schedule 'room_evan'>/2/?:<Rule with sub <Schedule 'room_evan'>>>
2019-11-21 21:59:41.151668 INFO shedy_heating: --- [R:room_rose]     ������ => IncludeSchedule(<Schedule 'room_rose'>)
2019-11-21 21:59:41.160658 INFO shedy_heating: --- [R:room_evan]         ������ [SUB]  <<Schedule 'room_evan'>/2/?/1:<Rule with sub <Schedule of 3 rules>, v=21>>
2019-11-21 21:59:41.177089 INFO shedy_heating: --- [R:room_evan]             ������ [ACT]  <<Schedule 'room_evan'>/2/?/1/1:<Rule x="Break() if float(state('sensor.xiaomi_mi"...>>
2019-11-21 21:59:41.181594 INFO shedy_heating: --- [R:room_evan]             ������ => Next()
2019-11-21 21:59:41.185520 INFO shedy_heating: --- [R:room_evan]             ������ [SUB]  <<Schedule 'room_evan'>/2/?/1/2:<Rule with sub <Schedule of 1 rules>, weekdays={1-5}>>
2019-11-21 21:59:41.187926 INFO shedy_heating: --- [R:room_evan]                 ������ [SUB]  <<Schedule 'room_evan'>/2/?/1/2/1:<Rule with sub <Schedule of 3 rules>>>
2019-11-21 21:59:41.191029 INFO shedy_heating: --- [R:room_evan]                     ������ [ACT]  <<Schedule 'room_evan'>/2/?/1/2/1/1:<Rule x="Next() if heating_mode() != 'Normal' els"...>>
2019-11-21 21:59:41.193643 INFO shedy_heating: --- [R:room_evan]                     ������ => Break()
2019-11-21 21:59:41.200087 INFO shedy_heating: --- [R:room_rose]     ������ [SUB]  <<Schedule 'room_rose'>/2/?:<Rule with sub <Schedule 'room_rose'>>>
2019-11-21 21:59:41.216560 INFO shedy_heating: --- [R:room_rose]         ������ [SUB]  <<Schedule 'room_rose'>/2/?/1:<Rule with sub <Schedule of 3 rules>, v=21>>
2019-11-21 21:59:41.219457 INFO shedy_heating: --- [R:room_evan]                     ������ == breaking out of [<Rule with sub <Schedule 'room-individual'>>, <Rule with sub <Schedule 'room_evan'>>, <Rule with sub <Schedule of 3 rules>, v=21>, <Rule with sub <Schedule of 1 rules>, weekdays={1-5}>, <Rule with sub <Schedule of 3 rules>>]
2019-11-21 21:59:41.227446 INFO shedy_heating: --- [R:room_evan]             ������ [SUB]  <<Schedule 'room_evan'>/2/?/1/3:<Rule with sub <Schedule of 2 rules>, weekdays={6-7}>>
2019-11-21 21:59:41.229938 INFO shedy_heating: --- [R:room_evan]                 ������ [INA]  <<Schedule 'room_evan'>/2/?/1/3/1:<Rule from 08:00 to 09:00>>
2019-11-21 21:59:41.232362 INFO shedy_heating: --- [R:room_evan]                 ������ [INA]  <<Schedule 'room_evan'>/2/?/1/3/2:<Rule from 21:00 to 22:30>>
2019-11-21 21:59:41.251108 INFO shedy_heating: --- [R:room_rose]             ������ [ACT]  <<Schedule 'room_rose'>/2/?/1/1:<Rule x="Break() if float(state('sensor.xiaomi_mi"...>>
2019-11-21 21:59:41.253667 INFO shedy_heating: --- [R:room_rose]             ������ => Break()
2019-11-21 21:59:41.263609 INFO shedy_heating: --- [R:room_rose]             ������ == breaking out of [<Rule with sub <Schedule 'room-individual'>>, <Rule with sub <Schedule 'room_rose'>>, <Rule with sub <Schedule of 3 rules>, v=21>]
2019-11-21 21:59:41.267968 INFO shedy_heating: --- [R:room_evan] ������ [SUB]  <<Schedule 'room_evan'>/3:<Rule with sub <Schedule 'append'>>>
2019-11-21 21:59:41.271480 INFO shedy_heating: --- [R:room_evan]     ������ [ACT]  <<Schedule 'room_evan'>/3/1:<Rule v='OFF'>>
2019-11-21 21:59:41.273639 INFO shedy_heating: --- [R:room_rose] ������ [SUB]  <<Schedule 'room_rose'>/3:<Rule with sub <Schedule 'append'>>>
2019-11-21 21:59:41.278694 INFO shedy_heating: --- [R:room_rose]     ������ [ACT]  <<Schedule 'room_rose'>/3/1:<Rule v='OFF'>>
2019-11-21 21:59:41.275978 INFO shedy_heating: --- [R:room_evan]     ������ => 'OFF'
2019-11-21 21:59:41.283478 INFO shedy_heating: --- [R:room_evan] Final result: OFF, markers: set()
2019-11-21 21:59:41.292653 INFO shedy_heating: --- [R:room_evan] Result didn't change, not setting it again.
2019-11-21 21:59:41.281224 INFO shedy_heating: --- [R:room_rose]     ������ => 'OFF'
2019-11-21 21:59:41.298097 INFO shedy_heating: --- [R:room_rose] Final result: OFF, markers: set()
2019-11-21 21:59:41.294005 INFO shedy_heating: --- [R:room_evan] Unchanged HA state: state='OFF', attributes={'actor_wanted_values': {'climate.air_conditioner_evan': 'OFF'}, 'scheduled_value': 'OFF', 'rescheduling_time': None, 'overlay_active': False}
2019-11-21 21:59:41.308657 INFO shedy_heating: --- [R:room_rose] Result didn't change, not setting it again.
2019-11-21 21:59:41.310809 INFO shedy_heating: --- [R:room_rose] Unchanged HA state: state='OFF', attributes={'actor_wanted_values': {'climate.air_conditioner_rose': 'OFF'}, 'scheduled_value': 'OFF', 'rescheduling_time': None, 'overlay_active': False}
2019-11-21 22:00:36.244649 INFO shedy_heating: --- [R:bedroom] ������ [SUB]  <<Schedule 'bedroom'>/1:<Rule with sub <Schedule 'prepend'>>>
2019-11-21 22:00:36.247834 INFO shedy_heating: --- [R:bedroom]     ������ [ACT]  <<Schedule 'bedroom'>/1/1:<Rule x='Mark(OFF, Mark.OVERLAY) if not is_empty('...>>
2019-11-21 22:00:36.251807 INFO shedy_heating: --- [R:room_rose]     ������ [ACT]  <<Schedule 'room_rose'>/1/1:<Rule x='Mark(OFF, Mark.OVERLAY) if not is_empty('...>>
2019-11-21 22:00:36.254680 INFO shedy_heating: --- [R:room_evan]     ������ [ACT]  <<Schedule 'room_evan'>/1/1:<Rule x='Mark(OFF, Mark.OVERLAY) if not is_empty('...>>
2019-11-21 22:00:36.256845 INFO shedy_heating: --- [R:room_evan] Initializing expression helper: BasicHelper, order = 0
2019-11-21 22:00:36.266639 INFO shedy_heating: --- [R:bedroom] Initializing expression helper: BasicHelper, order = 0
2019-11-21 22:00:36.276936 INFO shedy_heating: --- [R:room_rose] Initializing expression helper: BasicHelper, order = 0
2019-11-21 22:00:36.279390 INFO shedy_heating: --- [R:room_rose] Initializing expression helper: PatternHelper, order = 0
2019-11-21 22:00:36.282045 INFO shedy_heating: --- [R:room_rose] Initializing expression helper: ScheduleHelper, order = 0
2019-11-21 22:00:36.282829 INFO shedy_heating: --- [R:room_evan] Initializing expression helper: PatternHelper, order = 0
2019-11-21 22:00:36.313043 INFO shedy_heating: --- [R:room_rose] Initializing expression helper: StateHelper, order = 0
2019-11-21 22:00:36.338285 INFO shedy_heating: --- [R:room_evan] Initializing expression helper: ScheduleHelper, order = 0
2019-11-21 22:00:36.340597 INFO shedy_heating: --- [R:room_rose] Initializing expression helper: ThermostatExpressionHelper, order = 0
2019-11-21 22:00:36.343720 INFO shedy_heating: --- [R:room_rose] Initializing expression helper: CustomEnvironmentHelper, order = 1000
2019-11-21 22:00:36.354099 INFO shedy_heating: --- [R:room_evan] Initializing expression helper: StateHelper, order = 0
2019-11-21 22:00:36.356390 INFO shedy_heating: --- [R:room_evan] Initializing expression helper: ThermostatExpressionHelper, order = 0
2019-11-21 22:00:36.358877 INFO shedy_heating: --- [R:room_rose] Executing the expression_environment script.
2019-11-21 22:00:36.360278 INFO shedy_heating: --- [R:bedroom] Initializing expression helper: PatternHelper, order = 0
2019-11-21 22:00:36.363103 INFO shedy_heating: --- [R:bedroom] Initializing expression helper: ScheduleHelper, order = 0
2019-11-21 22:00:36.383650 INFO shedy_heating: --- [R:room_evan] Initializing expression helper: CustomEnvironmentHelper, order = 1000
2019-11-21 22:00:36.386264 INFO shedy_heating: --- [R:room_evan] Executing the expression_environment script.
2019-11-21 22:00:36.395900 INFO shedy_heating: --- [R:bedroom] Initializing expression helper: StateHelper, order = 0
2019-11-21 22:00:36.397534 INFO shedy_heating: --- [R:bedroom] Initializing expression helper: ThermostatExpressionHelper, order = 0
2019-11-21 22:00:36.503695 INFO shedy_heating: --- [R:bedroom] Initializing expression helper: CustomEnvironmentHelper, order = 1000
2019-11-21 22:00:36.505945 INFO shedy_heating: --- [R:bedroom] Executing the expression_environment script.
2019-11-21 22:00:36.719953 INFO shedy_heating: --- [R:bedroom]     ������ => Next()
2019-11-21 22:00:36.721568 INFO shedy_heating: --- [R:room_evan]     ������ => Next()
2019-11-21 22:00:36.733410 INFO shedy_heating: --- [R:room_rose]     ������ => Next()
2019-11-21 22:00:36.735734 INFO shedy_heating: --- [R:room_rose]     ������ [ACT]  <<Schedule 'room_rose'>/1/2:<Rule x="Abort() if is_off('input_boolean.automat"...>>
2019-11-21 22:00:36.738127 INFO shedy_heating: --- [R:room_evan]     ������ [ACT]  <<Schedule 'room_evan'>/1/2:<Rule x="Abort() if is_off('input_boolean.automat"...>>
2019-11-21 22:00:36.748262 INFO shedy_heating: --- [R:bedroom]     ������ [ACT]  <<Schedule 'bedroom'>/1/2:<Rule x="Abort() if is_off('input_boolean.automat"...>>
2019-11-21 22:00:37.051028 INFO shedy_heating: --- [R:room_rose]     ������ => Next()
2019-11-21 22:00:37.064750 INFO shedy_heating: --- [R:room_evan]     ������ => Next()
2019-11-21 22:00:37.107296 INFO shedy_heating: --- [R:room_evan]     ������ [ACT]  <<Schedule 'room_evan'>/1/3:<Rule x="Abort() if is_off('input_boolean.automat"...>>
2019-11-21 22:00:37.107897 INFO shedy_heating: --- [R:room_rose]     ������ [ACT]  <<Schedule 'room_rose'>/1/3:<Rule x="Abort() if is_off('input_boolean.automat"...>>
2019-11-21 22:00:37.392015 INFO shedy_heating: --- [R:bedroom]     ������ => Next()
2019-11-21 22:00:37.392462 INFO shedy_heating: --- [R:room_evan]     ������ => Next()
2019-11-21 22:00:37.400033 INFO shedy_heating: --- [R:room_rose]     ������ => Next()
2019-11-21 22:00:37.413477 INFO shedy_heating: --- [R:bedroom]     ������ [ACT]  <<Schedule 'bedroom'>/1/3:<Rule x="Abort() if is_off('input_boolean.automat"...>>
2019-11-21 22:00:37.415948 INFO shedy_heating: --- [R:room_evan] ������ [SUB]  <<Schedule 'room_evan'>/2:<Rule with sub <Schedule 'room-individual'>>>
2019-11-21 22:00:37.418534 INFO shedy_heating: --- [R:room_evan]     ������ [ACT]  <<Schedule 'room_evan'>/2/1:<Rule x="IncludeSchedule(schedule_snippets['room_"...>>
2019-11-21 22:00:37.419521 INFO shedy_heating: --- [R:room_rose] ������ [SUB]  <<Schedule 'room_rose'>/2:<Rule with sub <Schedule 'room-individual'>>>
2019-11-21 22:00:37.423509 INFO shedy_heating: --- [R:room_rose]     ������ [ACT]  <<Schedule 'room_rose'>/2/1:<Rule x="IncludeSchedule(schedule_snippets['room_"...>>
2019-11-21 22:00:37.472654 INFO shedy_heating: --- [R:room_evan]     ������ => IncludeSchedule(<Schedule 'room_evan'>)
2019-11-21 22:00:37.544870 INFO shedy_heating: --- [R:room_rose]     ������ => IncludeSchedule(<Schedule 'room_rose'>)
2019-11-21 22:00:37.558577 INFO shedy_heating: --- [R:room_evan]     ������ [SUB]  <<Schedule 'room_evan'>/2/?:<Rule with sub <Schedule 'room_evan'>>>
2019-11-21 22:00:37.615757 INFO shedy_heating: --- [R:room_rose]     ������ [SUB]  <<Schedule 'room_rose'>/2/?:<Rule with sub <Schedule 'room_rose'>>>
2019-11-21 22:00:37.646489 INFO shedy_heating: --- [R:room_evan]         ������ [SUB]  <<Schedule 'room_evan'>/2/?/1:<Rule with sub <Schedule of 3 rules>, v=21>>
2019-11-21 22:00:37.660605 INFO shedy_heating: --- [R:room_rose]         ������ [SUB]  <<Schedule 'room_rose'>/2/?/1:<Rule with sub <Schedule of 3 rules>, v=21>>
2019-11-21 22:00:37.721335 INFO shedy_heating: --- [R:room_rose]             ������ [ACT]  <<Schedule 'room_rose'>/2/?/1/1:<Rule x="Break() if float(state('sensor.xiaomi_mi"...>>
2019-11-21 22:00:37.826608 INFO shedy_heating: --- [R:room_evan]             ������ [ACT]  <<Schedule 'room_evan'>/2/?/1/1:<Rule x="Break() if float(state('sensor.xiaomi_mi"...>>
2019-11-21 22:00:38.037061 INFO shedy_heating: --- [SP:upstairs_temp_delta] Value for A:climate.air_conditioner_bedroom in R:bedroom is 0.0.
2019-11-21 22:00:38.039730 INFO shedy_heating: --- [SP:upstairs_temp_delta] Value for A:climate.air_conditioner_evan in R:room_evan is 0.0.
2019-11-21 22:00:38.046271 INFO shedy_heating: --- [SP:upstairs_temp_delta] Value for A:climate.air_conditioner_rose in R:room_rose is 0.0.
2019-11-21 22:00:38.060283 INFO shedy_heating: --- [R:room_rose]             ������ => Break()
2019-11-21 22:00:38.062420 INFO shedy_heating: --- [R:bedroom]     ������ => Next()
2019-11-21 22:00:38.072178 INFO shedy_heating: --- [R:bedroom] ������ [SUB]  <<Schedule 'bedroom'>/2:<Rule with sub <Schedule 'room-individual'>>>
2019-11-21 22:00:38.086740 INFO shedy_heating: --- [R:room_rose] ������ [SUB]  <<Schedule 'room_rose'>/3:<Rule with sub <Schedule 'append'>>>
2019-11-21 22:00:38.088898 INFO shedy_heating: --- [R:room_rose]     ������ [ACT]  <<Schedule 'room_rose'>/3/1:<Rule v='OFF'>>
2019-11-21 22:00:38.084153 INFO shedy_heating: --- [R:bedroom]     ������ [ACT]  <<Schedule 'bedroom'>/2/1:<Rule x="IncludeSchedule(schedule_snippets['bedro"...>>
2019-11-21 22:00:38.096203 INFO shedy_heating: --- [R:bedroom]     ������ => IncludeSchedule(<Schedule 'bedroom'>)
2019-11-21 22:00:38.107283 INFO shedy_heating: --- [R:room_rose]     ������ => 'OFF'
2019-11-21 22:00:38.108805 INFO shedy_heating: --- [R:bedroom]     ������ [SUB]  <<Schedule 'bedroom'>/2/?:<Rule with sub <Schedule 'bedroom'>>>
2019-11-21 22:00:38.122540 INFO shedy_heating: --- [R:room_rose] Final result: OFF, markers: set()
2019-11-21 22:00:38.127861 INFO shedy_heating: --- [R:room_rose] Result didn't change, not setting it again.
2019-11-21 22:00:38.131787 INFO shedy_heating: --- [R:bedroom]         ������ [SUB]  <<Schedule 'bedroom'>/2/?/1:<Rule with sub <Schedule of 3 rules>, v=24>>
2019-11-21 22:00:38.166969 INFO shedy_heating: --- [R:bedroom]             ������ [ACT]  <<Schedule 'bedroom'>/2/?/1/1:<Rule x="Break() if float(state('sensor.temperatu"...>>
2019-11-21 22:00:38.168780 INFO shedy_heating: --- [R:room_rose] Unchanged HA state: state='OFF', attributes={'actor_wanted_values': {'climate.air_conditioner_rose': 'OFF'}, 'scheduled_value': 'OFF', 'rescheduling_time': None, 'overlay_active': False}
2019-11-21 22:00:38.169983 INFO shedy_heating: --- [SP:upstairs_temp_delta] Unchanged HA state: attributes={'min': 0.0, 'avg': 0.0, 'max': 0.0}
2019-11-21 22:00:38.485149 INFO shedy_heating: --- [R:room_evan]             ������ => Next()
2019-11-21 22:00:38.492390 INFO shedy_heating: --- [R:room_evan]             ������ [SUB]  <<Schedule 'room_evan'>/2/?/1/2:<Rule with sub <Schedule of 1 rules>, weekdays={1-5}>>
2019-11-21 22:00:38.493761 INFO shedy_heating: --- [R:room_evan]                 ������ [SUB]  <<Schedule 'room_evan'>/2/?/1/2/1:<Rule with sub <Schedule of 3 rules>>>
2019-11-21 22:00:38.507868 INFO shedy_heating: --- [R:room_evan]                     ������ [ACT]  <<Schedule 'room_evan'>/2/?/1/2/1/1:<Rule x="Next() if heating_mode() != 'Normal' els"...>>
2019-11-21 22:00:38.801595 INFO shedy_heating: --- [R:bedroom]             ������ => Next()
2019-11-21 22:00:38.806398 INFO shedy_heating: --- [R:room_evan]                     ������ => Break()
2019-11-21 22:00:38.808122 INFO shedy_heating: --- [R:room_evan]                     ������ == breaking out of [<Rule with sub <Schedule 'room-individual'>>, <Rule with sub <Schedule 'room_evan'>>, <Rule with sub <Schedule of 3 rules>, v=21>, <Rule with sub <Schedule of 1 rules>, weekdays={1-5}>, <Rule with sub <Schedule of 3 rules>>]
2019-11-21 22:00:38.818268 INFO shedy_heating: --- [R:bedroom]             ������ [SUB]  <<Schedule 'bedroom'>/2/?/1/2:<Rule with sub <Schedule of 1 rules>, weekdays={1-5}>>
2019-11-21 22:00:38.819237 INFO shedy_heating: --- [R:room_evan]             ������ [SUB]  <<Schedule 'room_evan'>/2/?/1/3:<Rule with sub <Schedule of 2 rules>, weekdays={6-7}>>
2019-11-21 22:00:38.833538 INFO shedy_heating: --- [R:bedroom]                 ������ [SUB]  <<Schedule 'bedroom'>/2/?/1/2/1:<Rule with sub <Schedule of 3 rules>>>
2019-11-21 22:00:38.836332 INFO shedy_heating: --- [R:bedroom]                     ������ [ACT]  <<Schedule 'bedroom'>/2/?/1/2/1/1:<Rule x="Next() if heating_mode() != 'Normal' els"...>>
2019-11-21 22:00:38.836884 INFO shedy_heating: --- [R:room_evan]                 ������ [INA]  <<Schedule 'room_evan'>/2/?/1/3/1:<Rule from 08:00 to 09:00>>
2019-11-21 22:00:38.839307 INFO shedy_heating: --- [R:bedroom]                     ������ => Break()
2019-11-21 22:00:38.848412 INFO shedy_heating: --- [R:room_evan]                 ������ [INA]  <<Schedule 'room_evan'>/2/?/1/3/2:<Rule from 21:00 to 22:30>>
2019-11-21 22:00:38.854656 INFO shedy_heating: --- [R:room_evan] ������ [SUB]  <<Schedule 'room_evan'>/3:<Rule with sub <Schedule 'append'>>>
2019-11-21 22:00:38.852115 INFO shedy_heating: --- [R:bedroom]                     ������ == breaking out of [<Rule with sub <Schedule 'room-individual'>>, <Rule with sub <Schedule 'bedroom'>>, <Rule with sub <Schedule of 3 rules>, v=24>, <Rule with sub <Schedule of 1 rules>, weekdays={1-5}>, <Rule with sub <Schedule of 3 rules>>]
2019-11-21 22:00:38.861468 INFO shedy_heating: --- [R:room_evan]     ������ [ACT]  <<Schedule 'room_evan'>/3/1:<Rule v='OFF'>>
2019-11-21 22:00:38.865109 INFO shedy_heating: --- [R:room_evan]     ������ => 'OFF'
2019-11-21 22:00:38.867209 INFO shedy_heating: --- [R:bedroom]             ������ [SUB]  <<Schedule 'bedroom'>/2/?/1/3:<Rule with sub <Schedule of 2 rules>, weekdays={6-7}>>
2019-11-21 22:00:38.869705 INFO shedy_heating: --- [R:room_evan] Final result: OFF, markers: set()
2019-11-21 22:00:38.871960 INFO shedy_heating: --- [R:room_evan] Result didn't change, not setting it again.
2019-11-21 22:00:38.874576 INFO shedy_heating: --- [R:room_evan] Unchanged HA state: state='OFF', attributes={'actor_wanted_values': {'climate.air_conditioner_evan': 'OFF'}, 'scheduled_value': 'OFF', 'rescheduling_time': None, 'overlay_active': False}
2019-11-21 22:00:38.875361 INFO shedy_heating: --- [R:bedroom]                 ������ [INA]  <<Schedule 'bedroom'>/2/?/1/3/1:<Rule from 06:00 to 07:00>>
2019-11-21 22:00:38.877218 INFO shedy_heating: --- [R:bedroom]                 ������ [INA]  <<Schedule 'bedroom'>/2/?/1/3/2:<Rule from 22:00 to 23:59>>
2019-11-21 22:00:38.878593 INFO shedy_heating: --- [R:bedroom] ������ [SUB]  <<Schedule 'bedroom'>/3:<Rule with sub <Schedule 'append'>>>
2019-11-21 22:00:38.882228 INFO shedy_heating: --- [R:bedroom]     ������ [ACT]  <<Schedule 'bedroom'>/3/1:<Rule v='OFF'>>
2019-11-21 22:00:38.885294 INFO shedy_heating: --- [R:bedroom]     ������ => 'OFF'
2019-11-21 22:00:38.889803 INFO shedy_heating: --- [R:bedroom] Final result: OFF, markers: set()
2019-11-21 22:00:38.891073 INFO shedy_heating: --- [R:bedroom] Result didn't change, not setting it again.
2019-11-21 22:00:38.892291 INFO shedy_heating: --- [R:bedroom] Unchanged HA state: state='OFF', attributes={'actor_wanted_values': {'climate.air_conditioner_bedroom': 'OFF'}, 'scheduled_value': 'OFF', 'rescheduling_time': None, 'overlay_active': False}

Hi Again.

I found out that uncommenting line:

 - x: "Next() if heating_mode() != 'Normal' else Break()"

Will make the schedule work but also the input_boolean for automated heating here doesn’t work . here the concerned config parts:

shedy_heating:
  module: hass_apps_loader
  class: SchedyApp

  debug: true

  actor_type: thermostat

  expression_environment: |
    def heating_mode():
        return state("input_select.heating_mode")

  schedule_prepend:
  - x: "Mark(OFF, Mark.OVERLAY) if not is_empty(filter_entities('binary_sensor', window_room=room_name, state='on')) else Next()"
  - name: global schedule on/off switch
    x: "Abort() if is_off('input_boolean.automated_heating') else Next()"
  - name: per-room schedule on/off switch
    x: "Abort() if is_off('input_boolean.automated_heating_' + room_name) else Next()"


  rooms:
# BEDROOM
    bedroom:
      rescheduling_delay: 15
      actors:
        climate.air_conditioner_bedroom:
      watched_entities:
      - sensor.temperature_bedroom
      - binary_sensor.window_bedroom
      - input_boolean.automated_heating_bedroom
      schedule:
      - x: "IncludeSchedule(schedule_snippets['bedroom'])"
  schedule_snippets:
  # BEDROOM
    bedroom:
    - v: 30
      rules:
      # don't turn on when it's > 20 degrees in the bedroom
      - x: "Break() if float(state('sensor.temperature_bedroom') or 0) > 22 else Next()"
      - weekdays: 1-5
        rules:
        - rules:
#          - x: "Next() if heating_mode() != 'Normal' else Break()"
          - { start: "06:00", end: "07:00" }
          - { start: "21:00", end: "23:59" }

Hi @thundergreen

You seem to have configured input_boolean.automated_heating_bedroom as a watched entity twice, once globally and once for the room, which is bad because a change of that entity then triggers a reevaluation of all rooms. Furthermore, the config you provided is incomplete. Please upload the full config and a new log to GitHub gists or similar and post the link.

EDIT: And, of course, remove the global watching of input_boolean.automated_heating_bedroom first.

Hi @Sk4zz

Your thermostats seem to behave pretty weird. Both acknowledge the change and from that point on, they should report no old state anymore. Schedy already ignores reports from actors that haven’t confirmed a change yet, because these reports could still reflect the old value, so you’re safe in that regard. However, your thermostat reports the previous value after it already acknowledged the new one, which probably is due to some out of order reception of packets… what kind of thermostat are these? How are they connected? In any case, there is nothing Schedy could do against it.

Best regards
Robert

Hey @roschi

Thanks for the reply! So my initial suspicion was correct? The Thermostats report back the old temperature setpoint which is then in turn interpreted as a manual change.

I am using Eurotronic Spirit Zigbee thermostats connected via deCONZ. I have the impression that the deCONZ integration is not yet 100% stable. I will report my problem on their GitHub too.

Best regards

I re-added the per room input boolean again. this is the log when turnong on the boolean:

2019-11-22 10:49:03.305219 INFO shedy_heating: --- [R:bedroom] Doing schedule re-evaluation in 1 second [reset=False]


2019-11-22 10:49:04.004140 INFO shedy_heating: --- [R:bedroom] Evaluating room's schedule (reset=False, force_resend=False).


2019-11-22 10:49:04.006497 INFO shedy_heating: --- [R:bedroom] Assuming it to be 2019-11-22 10:49:04.


2019-11-22 10:49:04.008971 INFO shedy_heating: --- [R:bedroom] ������ [SUB]  <<Schedule 'bedroom'>/1:<Rule with sub <Schedule 'prepend'>>>


2019-11-22 10:49:04.011470 INFO shedy_heating: --- [R:bedroom]     ������ [ACT]  <<Schedule 'bedroom'>/1/1:<Rule x='Mark(OFF, Mark.OVERLAY) if not is_empty('...>>


2019-11-22 10:49:04.014139 INFO shedy_heating: --- [R:bedroom] Initializing expression helper: BasicHelper, order = 0


2019-11-22 10:49:04.017175 INFO shedy_heating: --- [R:bedroom] Initializing expression helper: PatternHelper, order = 0


2019-11-22 10:49:04.019494 INFO shedy_heating: --- [R:bedroom] Initializing expression helper: ScheduleHelper, order = 0


2019-11-22 10:49:04.021675 INFO shedy_heating: --- [R:bedroom] Initializing expression helper: StateHelper, order = 0


2019-11-22 10:49:04.024480 INFO shedy_heating: --- [R:bedroom] Initializing expression helper: ThermostatExpressionHelper, order = 0


2019-11-22 10:49:04.032376 INFO shedy_heating: --- [R:bedroom] Initializing expression helper: CustomEnvironmentHelper, order = 1000


2019-11-22 10:49:04.034139 INFO shedy_heating: --- [R:bedroom] Executing the expression_environment script.


2019-11-22 10:49:04.045579 INFO shedy_heating: --- [R:bedroom]     ������ => Next()


2019-11-22 10:49:04.048120 INFO shedy_heating: --- [R:bedroom]     ������ [ACT]  <<Schedule 'bedroom'>/1/2:<Rule x="Abort() if is_off('input_boolean.automat"...>>


2019-11-22 10:49:04.050722 INFO shedy_heating: --- [R:bedroom]     ������ => Next()


2019-11-22 10:49:04.053195 INFO shedy_heating: --- [R:bedroom]     ������ [ACT]  <<Schedule 'bedroom'>/1/3:<Rule x="Abort() if is_off('input_boolean.automat"...>>


2019-11-22 10:49:04.055677 INFO shedy_heating: --- [R:bedroom]     ������ => Next()


2019-11-22 10:49:04.057976 INFO shedy_heating: --- [R:bedroom] ������ [SUB]  <<Schedule 'bedroom'>/2:<Rule with sub <Schedule 'room-individual'>>>


2019-11-22 10:49:04.060202 INFO shedy_heating: --- [R:bedroom]     ������ [ACT]  <<Schedule 'bedroom'>/2/1:<Rule x="IncludeSchedule(schedule_snippets['bedro"...>>


2019-11-22 10:49:04.062640 INFO shedy_heating: --- [R:bedroom]     ������ => IncludeSchedule(<Schedule 'bedroom'>)


2019-11-22 10:49:04.066137 INFO shedy_heating: --- [R:bedroom]     ������ [SUB]  <<Schedule 'bedroom'>/2/?:<Rule with sub <Schedule 'bedroom'>>>


2019-11-22 10:49:04.068718 INFO shedy_heating: --- [R:bedroom]         ������ [SUB]  <<Schedule 'bedroom'>/2/?/1:<Rule with sub <Schedule of 3 rules>, v=30>>


2019-11-22 10:49:04.071324 INFO shedy_heating: --- [R:bedroom]             ������ [ACT]  <<Schedule 'bedroom'>/2/?/1/1:<Rule x="Break() if float(state('sensor.temperatu"...>>


2019-11-22 10:49:04.074116 INFO shedy_heating: --- [R:bedroom]             ������ => Next()


2019-11-22 10:49:04.076796 INFO shedy_heating: --- [R:bedroom]             ������ [SUB]  <<Schedule 'bedroom'>/2/?/1/2:<Rule with sub <Schedule of 1 rules>, weekdays={1-5}>>


2019-11-22 10:49:04.079333 INFO shedy_heating: --- [R:bedroom]                 ������ [SUB]  <<Schedule 'bedroom'>/2/?/1/2/1:<Rule with sub <Schedule of 3 rules>>>


2019-11-22 10:49:04.082021 INFO shedy_heating: --- [R:bedroom]                     ������ [INA]  <<Schedule 'bedroom'>/2/?/1/2/1/1:<Rule from 06:30 to 07:00>>


2019-11-22 10:49:04.084661 INFO shedy_heating: --- [R:bedroom]                     ������ [ACT]  <<Schedule 'bedroom'>/2/?/1/2/1/2:<Rule from 10:00 to 12:00>>


2019-11-22 10:49:04.087181 INFO shedy_heating: --- [R:bedroom]                     ������ => 30


2019-11-22 10:49:04.089552 INFO shedy_heating: --- [R:bedroom] Final result: 30.0��, markers: set()


2019-11-22 10:49:04.091679 INFO shedy_heating: --- [R:bedroom] Result didn't change, not setting it again.


2019-11-22 10:49:04.093986 INFO shedy_heating: --- [R:bedroom] Unchanged HA state: state='OFF', attributes={'actor_wanted_values': {'climate.air_conditioner_bedroom': 'OFF'}, 'scheduled_value': '30.0', 'rescheduling_time': 1574417156.643326, 'overlay_active': False}

I guess now it should be ok as it will re-schedule after 15 minutes. Let me observe this behaviour and revert before making tons of logs :slight_smile:

@roschi would it be possible to get a more human readable re-scjhedule time?

Hello all

I’m looking for a way to reset rescheduling timer.
"rescheduling delay: 0 " parameter helps a bit but not in all case.

Use case:
My covers are correctly scheduled.
Sometimes, when direct sunlight is “hurting” , they are manually closed. I set a rescheduling time of two hours
I’d like the rescheduling timer to be reset when covers are manually open and then in sync which the normal schedule.

Another use case is for a desk working light which is also a room light, sometimes I want it to stay on until manually switched off.

@Reynald I don’t completely understand your requirements. You want the light to stay on after you manually turned it on? That’s doable by setting rescheduling_delay to some sensible value. When you then turn it back off, it again adheres to the schedule, doesn’t it?

EDIT: If you want to manually force the schedule to be applied, that can be achieved by firing a schedy_reevaluate event in reset mode. The docs on events tell more about this.

Hi Roschi

I have a very simple setup, however I want to put some heaters in “Away-Mode” when I am not at home but if I set teh generi thermostate to “Away-Mode” schedy overrides this

Is there a way to set scedy to obey what the thermostat is set at in the gui - This is a WAF issue

I do also have life360 tracking and wondering if it can be done based on device tracking of away or home - I see it mentions it can in the docs, just cant get it it

Cheers

I have a very simple setup, however I want to put some heaters in “Away-Mode” when I am not at home but if I set teh generi thermostate to “Away-Mode” schedy overrides this

You could prepend a rule that returns Abort() when one of the thermostats of the room is in away mode.

I do also have life360 tracking and wondering if it can be done based on device tracking of away or home - I see it mentions it can in the docs, just cant get it it

Same here. Prepend a rule that checks for the state of your device tracker and let it do whatever you want. You should probably re-read the chapters about expressions in schedules + the attached examples.

Hello,

I have some difficulties to explain.

Lets talk about light example:

  • I have 4 lights in a room, switched on by motion. One of these is a working light on my “hobby desk”
  • I need to do some soldering, I switch on manually in home assistant (or via a remote button)
  • Schedy won’t touch it during the rescheduling delay (2 hours)
  • When I finish, I switch it back off, lets say after one hour
  • I want to reset the rescheduling delay

That’s exactly what you point out in your edit, thank you!

schedy_reevaluate:
mode: reset : Re-evaluate the schedule and set the resulting value to all actors in the room, no matter if it has changed or not. This mode also discardss a re-scheduling eventually planned for the future and instead performs one immediately.

Hey Guys,

wondering if somebody could help me with the following error. I already posted this message on a separate thread but I got the advice to also add this to the Schedy thread.

I try to get Schedy to work but I got the following error:

2019-11-25 17:59:44.898533 WARNING AppDaemon: ------------------------------------------------------------
2019-11-25 17:59:44.900244 WARNING AppDaemon: Unexpected error initializing app: schedy_heating:
2019-11-25 17:59:44.902473 WARNING AppDaemon: ------------------------------------------------------------
2019-11-25 17:59:44.909119 WARNING AppDaemon: Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/appdaemon/appdaemon.py", line 2051, in check_app_updates
    self.init_object(app)
  File "/usr/local/lib/python3.7/dist-packages/appdaemon/appdaemon.py", line 1567, in init_object
    modname = __import__(app_args["module"])
  File "/home/homeassistant/conf/apps/hass_apps_loader.py", line 3, in <module>
    from hass_apps.loader import *
ModuleNotFoundError: No module named 'hass_apps'

2019-11-25 17:59:44.915516 WARNING AppDaemon: ------------------------------------------------------------
2019-11-25 17:59:45.072699 WARNING AppDaemon: ------------------------------------------------------------
2019-11-25 17:59:45.075186 WARNING AppDaemon: Unexpected error initializing app: schedy_heating:
2019-11-25 17:59:45.077112 WARNING AppDaemon: ------------------------------------------------------------
2019-11-25 17:59:45.078391 WARNING AppDaemon: Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/appdaemon/appdaemon.py", line 2051, in check_app_updates
    self.init_object(app)
  File "/usr/local/lib/python3.7/dist-packages/appdaemon/appdaemon.py", line 1567, in init_object
    modname = __import__(app_args["module"])
  File "/home/homeassistant/conf/apps/hass_apps_loader.py", line 3, in <module>
    from hass_apps.loader import *
ModuleNotFoundError: No module named 'hass_apps'

2019-11-25 17:59:45.079087 WARNING AppDaemon: ------------------------------------------------------------

appreciate any help,

gr Piet

That’s certainly due to an improperly performed installation. Follow the instructions in the docs again thoroughly and if it still doesn’t work, describe exactly what you did and what the error looks like.

Good day,

I try to give as much information as possible:

In order to use hass-apps in the hass.io ecosystem, you first need to set up an AppDaemon add-on. The recommended add-on is this one.

So I have AppDaemon running. Because when I use the following command:

sudo appdaemon -c /home/homeassistant/conf

I am able to acces HADashboard. Side note: autostart after reboot is not working currently and also I get this error “port 5050 already in use” when I try to start it sometimes. But this is a separate issue I guess.

I head over to the “manual installation” on this (Getting Started — hass-apps 0.20190927.0 documentation) page.

The minimum required python version is 3.5. I am running 3.7.3

python3 --version

“It is strongly recommended to install hass-apps (+ it’s dependencies like AppDaemon) into a virtualenv, separated even from Home Assistant in order to avoid conflicts with different versions of dependency packages.”

Well, I dont know what virtualenv is. After this it is just copy and paste for me! On to the simple steps:

Step 1:

sudo apt install python3-venv

result:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
python3-venv is already the newest version (3.7.3-1).
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

Step 2:

Make a directory “appdaemon” (example is using the home directory, I used “/home/pi”).

python3 -m venv /home/pi/appdaemon/venv

Command executed, no errors.

Step 3:

cd to appdaemon and and activate virtualenv.

cd /home/pi/appdaemon
source venv/bin/activate

Step 4:

(venv) pi@hassbian:~/appdaemon $ pip install --upgrade pip setuptools wheel
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already up-to-date: pip in ./venv/lib/python3.7/site-packages (19.3.1)
Collecting setuptools
  Downloading https://files.pythonhosted.org/packages/9e/d5/444a443d890f09fc1ca1a2c3c9fc7e84cb148177b05ac94fe5084e3d9abb/setuptools-42.0.1-py2.py3-none-any.whl (582kB)
     |████████████████████████████████| 583kB 4.6MB/s 
Requirement already up-to-date: wheel in ./venv/lib/python3.7/site-packages (0.33.6)
Installing collected packages: setuptools
  Found existing installation: setuptools 42.0.0
    Uninstalling setuptools-42.0.0:
      Successfully uninstalled setuptools-42.0.0
Successfully installed setuptools-42.0.1
(venv) pi@hassbian:~/appdaemon $ 

All oke!

Step 5:

(venv) pi@hassbian:~/appdaemon $ pip install --upgrade hass-apps
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already up-to-date: hass-apps in ./venv/lib/python3.7/site-packages (0.20190927.0)
Requirement already satisfied, skipping upgrade: cached-property>=1.5.1 in ./venv/lib/python3.7/site-packages (from hass-apps) (1.5.1)
Requirement already satisfied, skipping upgrade: appdaemon>=3.0 in ./venv/lib/python3.7/site-packages (from hass-apps) (3.0.5)
Requirement already satisfied, skipping upgrade: voluptuous>=0.11 in ./venv/lib/python3.7/site-packages (from hass-apps) (0.11.7)
Requirement already satisfied, skipping upgrade: observable>=1.0 in ./venv/lib/python3.7/site-packages (from hass-apps) (1.0.3)
Requirement already satisfied, skipping upgrade: daemonize in ./venv/lib/python3.7/site-packages (from appdaemon>=3.0->hass-apps) (2.5.0)
Requirement already satisfied, skipping upgrade: astral in ./venv/lib/python3.7/site-packages (from appdaemon>=3.0->hass-apps) (1.10.1)
Requirement already satisfied, skipping upgrade: websocket-client in ./venv/lib/python3.7/site-packages (from appdaemon>=3.0->hass-apps) (0.56.0)
Requirement already satisfied, skipping upgrade: Jinja2==2.10.1 in ./venv/lib/python3.7/site-packages (from appdaemon>=3.0->hass-apps) (2.10.1)
Requirement already satisfied, skipping upgrade: iso8601 in ./venv/lib/python3.7/site-packages (from appdaemon>=3.0->hass-apps) (0.1.12)
Requirement already satisfied, skipping upgrade: paho-mqtt in ./venv/lib/python3.7/site-packages (from appdaemon>=3.0->hass-apps) (1.5.0)
Requirement already satisfied, skipping upgrade: requests>=2.6.0 in ./venv/lib/python3.7/site-packages (from appdaemon>=3.0->hass-apps) (2.22.0)
Requirement already satisfied, skipping upgrade: pyyaml==5.1 in ./venv/lib/python3.7/site-packages (from appdaemon>=3.0->hass-apps) (5.1)
Requirement already satisfied, skipping upgrade: aiohttp==2.3.10 in ./venv/lib/python3.7/site-packages (from appdaemon>=3.0->hass-apps) (2.3.10)
Requirement already satisfied, skipping upgrade: sseclient in ./venv/lib/python3.7/site-packages (from appdaemon>=3.0->hass-apps) (0.0.24)
Requirement already satisfied, skipping upgrade: yarl==1.1.0 in ./venv/lib/python3.7/site-packages (from appdaemon>=3.0->hass-apps) (1.1.0)
Requirement already satisfied, skipping upgrade: aiohttp-jinja2==0.15.0 in ./venv/lib/python3.7/site-packages (from appdaemon>=3.0->hass-apps) (0.15.0)
Requirement already satisfied, skipping upgrade: bcrypt in ./venv/lib/python3.7/site-packages (from appdaemon>=3.0->hass-apps) (3.1.7)
Requirement already satisfied, skipping upgrade: feedparser in ./venv/lib/python3.7/site-packages (from appdaemon>=3.0->hass-apps) (5.2.1)
Requirement already satisfied, skipping upgrade: pytz in ./venv/lib/python3.7/site-packages (from astral->appdaemon>=3.0->hass-apps) (2019.3)
Requirement already satisfied, skipping upgrade: six in ./venv/lib/python3.7/site-packages (from websocket-client->appdaemon>=3.0->hass-apps) (1.13.0)
Requirement already satisfied, skipping upgrade: MarkupSafe>=0.23 in ./venv/lib/python3.7/site-packages (from Jinja2==2.10.1->appdaemon>=3.0->hass-apps) (1.1.1)
Requirement already satisfied, skipping upgrade: chardet<3.1.0,>=3.0.2 in ./venv/lib/python3.7/site-packages (from requests>=2.6.0->appdaemon>=3.0->hass-apps) (3.0.4)
Requirement already satisfied, skipping upgrade: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in ./venv/lib/python3.7/site-packages (from requests>=2.6.0->appdaemon>=3.0->hass-apps) (1.25.7)
Requirement already satisfied, skipping upgrade: idna<2.9,>=2.5 in ./venv/lib/python3.7/site-packages (from requests>=2.6.0->appdaemon>=3.0->hass-apps) (2.8)
Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in ./venv/lib/python3.7/site-packages (from requests>=2.6.0->appdaemon>=3.0->hass-apps) (2019.9.11)
Requirement already satisfied, skipping upgrade: async-timeout>=1.2.0 in ./venv/lib/python3.7/site-packages (from aiohttp==2.3.10->appdaemon>=3.0->hass-apps) (3.0.1)
Requirement already satisfied, skipping upgrade: idna-ssl>=1.0.0 in ./venv/lib/python3.7/site-packages (from aiohttp==2.3.10->appdaemon>=3.0->hass-apps) (1.1.0)
Requirement already satisfied, skipping upgrade: multidict>=4.0.0 in ./venv/lib/python3.7/site-packages (from aiohttp==2.3.10->appdaemon>=3.0->hass-apps) (4.6.1)
Requirement already satisfied, skipping upgrade: cffi>=1.1 in ./venv/lib/python3.7/site-packages (from bcrypt->appdaemon>=3.0->hass-apps) (1.13.2)
Requirement already satisfied, skipping upgrade: pycparser in ./venv/lib/python3.7/site-packages (from cffi>=1.1->bcrypt->appdaemon>=3.0->hass-apps) (2.19)
(venv) pi@hassbian:~/appdaemon $ 

Also all oke. No errors.

I rebooted my rpi to check and executed:

sudo appdaemon -c /home/homeassistant/conf

and checked if HADashboard is running. It does! So I assume that I have a working AppDaemon at the moment.

I made myself a cup of coffee.

That is a lie. I made several cups.

I stored the file “hass_apps_loader.py” in the AppDaemon’s apps folder.

He! Maybe I found something. I am getting confused. I have made the following folder regarding venv:

/home/pi/appdaemon

whilst navigating got the apps I noticed that I also have the following directories:

/home/appdaemon/hass-apps/hass_apps (inside is “schedy”) (what about the double “hass_apps”?)

and

/home/homeassistant/conf

At this point I double check the configuration of AppDaemon (https://appdaemon.readthedocs.io/en/stable/CONFIGURE.html)

Looks oke.

In /home/homeassistant/conf/apps I have put the hass_apps_loader.py file as mentioned.

I made a schedy_heating.yaml also in the apps folder. I filled it with some standard code from the docs.

Thats it so far. I start to wonder if I put some of the files or folders inside the wrong location /home/homeassistant/conf and /home/appdaemon/hass-apps/hass_apps but am not sure.

Also this double hass_apps folder looks a little bit strange.

hopefully this will be enought information Roschi. I tried to be as thorough a I could be.

Regards, Piet