After watching the attributes of the binary_sensor.window_bedroom i found out that the attribute window_room was not set even I set this attribute in the customize.yaml. I now added those attribute manually via GUI in homeassistant frontend and it appears
Hmm… But it still does not work:
2019-11-10 11:34:09.400167 INFO bedroom_heating: --> [R:bedroom] [A:climate.air_conditioner_bedroom] Received value of 21.0��.
2019-11-10 11:34:09.407801 INFO bedroom_heating: — [R:bedroom] Re-applying the schedule not before 11:49:09 (in 0:15:00).
2019-11-10 11:34:24.579696 INFO bedroom_heating: --> Attribute ‘state’ of ‘binary_sensor.window_bedroom’ changed from ‘off’ to ‘on’, reevaluating .
2019-11-10 11:35:07.136110 INFO bedroom_heating: --> Attribute ‘state’ of ‘binary_sensor.window_bedroom’ changed from ‘on’ to ‘off’, reevaluating .
Here my config agaon:
https://pastebin.com/hn1ubTB0
I just created a debug log for my issue. I opened a window to turn off the climate component and this is the result:
2019-11-10 15:24:22.003642 INFO bedroom_heating: --- [SP:bedroom_temp_delta] Value for A:climate.air_conditioner_bedroom in R:bedroom is 0.0.
2019-11-10 15:24:22.005475 INFO bedroom_heating: --- [SP:bedroom_temp_delta] Unchanged HA state: attributes={'min': 0.0, 'avg': 0.0, 'max': 0.0}
2019-11-10 15:25:43.929221 INFO bedroom_heating: --> [R:bedroom] [A:climate.air_conditioner_bedroom] Attribute 'state' is 'heat'.
2019-11-10 15:25:43.932994 INFO bedroom_heating: --> [R:bedroom] [A:climate.air_conditioner_bedroom] Attribute 'temperature' is 30.0.
2019-11-10 15:25:43.935268 INFO bedroom_heating: --> [R:bedroom] [A:climate.air_conditioner_bedroom] Attribute 'current_temperature' is 22.8.
2019-11-10 15:25:43.937232 INFO bedroom_heating: --> [R:bedroom] [A:climate.air_conditioner_bedroom] Received value of 30.0��.
2019-11-10 15:25:43.939711 INFO bedroom_heating: --- [R:bedroom] Setting value to 30.0��. [manual]
2019-11-10 15:25:43.949057 INFO bedroom_heating: --- [R:bedroom] [A:climate.air_conditioner_bedroom] Not sending value 30.0�� redundantly.
2019-11-10 15:25:43.951299 INFO bedroom_heating: --- [R:bedroom] Re-applying the schedule not before 15:40:43 (in 0:15:00).
2019-11-10 15:25:43.953091 INFO bedroom_heating: --- [SP:bedroom_temp_delta] Going to update statistics in 3 seconds.
2019-11-10 15:25:43.971036 INFO bedroom_heating: <-- [R:bedroom] Sending state to HA: state='30.0', attributes={'actor_wanted_values': {'climate.air_conditioner_bedroom': '30.0'}, 'scheduled_value': 'OFF', 'rescheduling_time': 1573396843.0, 'overlay_active': False}
2019-11-10 15:25:46.004839 INFO bedroom_heating: --- [SP:bedroom_temp_delta] Value for A:climate.air_conditioner_bedroom in R:bedroom is 7.199999999999999.
2019-11-10 15:25:46.006213 INFO bedroom_heating: <-- [SP:bedroom_temp_delta] Sending state to HA: attributes={'min': 7.2, 'avg': 7.2, 'max': 7.2}
2019-11-10 15:28:33.852970 INFO bedroom_heating: --> Attribute 'state' of 'binary_sensor.window_bedroom' changed from 'off' to 'on', reevaluating <Room R:bedroom>.
2019-11-10 15:28:33.854094 INFO bedroom_heating: --- [R:bedroom] Doing schedule re-evaluation in 1 second [reset=False]
2019-11-10 15:28:34.038036 INFO bedroom_heating: --- [R:bedroom] Evaluating room's schedule (reset=False, force_resend=False).
2019-11-10 15:28:34.039271 INFO bedroom_heating: --- [R:bedroom] Assuming it to be 2019-11-10 15:28:34.
2019-11-10 15:28:34.040483 INFO bedroom_heating: --- [R:bedroom] ������ [SUB] <<Schedule 'bedroom'>/1:<Rule with sub <Schedule 'prepend'>>>
2019-11-10 15:28:34.041734 INFO bedroom_heating: --- [R:bedroom] ������ [ACT] <<Schedule 'bedroom'>/1/1:<Rule x='Mark(OFF, Mark.OVERLAY) if not is_empty('...>>
2019-11-10 15:28:34.043220 INFO bedroom_heating: --- [R:bedroom] Initializing expression helper: BasicHelper, order = 0
2019-11-10 15:28:34.044849 INFO bedroom_heating: --- [R:bedroom] Initializing expression helper: PatternHelper, order = 0
2019-11-10 15:28:34.046329 INFO bedroom_heating: --- [R:bedroom] Initializing expression helper: ScheduleHelper, order = 0
2019-11-10 15:28:34.047775 INFO bedroom_heating: --- [R:bedroom] Initializing expression helper: StateHelper, order = 0
2019-11-10 15:28:34.049655 INFO bedroom_heating: --- [R:bedroom] Initializing expression helper: ThermostatExpressionHelper, order = 0
2019-11-10 15:28:34.052220 INFO bedroom_heating: --- [R:bedroom] Initializing expression helper: CustomEnvironmentHelper, order = 1000
2019-11-10 15:28:34.054596 INFO bedroom_heating: --- [R:bedroom] Executing the expression_environment script.
2019-11-10 15:28:34.067984 INFO bedroom_heating: --- [R:bedroom] ������ => Mark(OFF, {'OVERLAY'})
2019-11-10 15:28:34.069730 INFO bedroom_heating: --- [R:bedroom] Final result: OFF
2019-11-10 15:28:34.071002 INFO bedroom_heating: --- [R:bedroom] Result markers: {'OVERLAY'}
2019-11-10 15:28:34.076204 INFO bedroom_heating: --- [R:bedroom] Result didn't change, not setting it again.
2019-11-10 15:28:34.077493 INFO bedroom_heating: --- [R:bedroom] Unchanged HA state: state='30.0', attributes={'actor_wanted_values': {'climate.air_conditioner_bedroom': '30.0'}, 'scheduled_value': 'OFF', 'rescheduling_time': 1573396843.0, 'overlay_active': False}