Does anybody have any tips on how to handle multiple heat sources? I have a floor heating (generic theme thermostat) and electric ovens (generic thermostat), I want to use the electric ovens only when the floor heating reaches the target temp to slow (or not at all).
I just opened the issue:
Thanks to be willed to investigate and sorry to bother you with that. I already saw in the Forum that some people had same issue but it turned out that they just copied wrong / not complete config snippets.
I double and tribble checked the config and can’t find an error for the moment.
You have to check the climate.SOMETHIGN object, not zwave.
Zwave object contains data relevant for the wireless network in general. Climate object contains data relevant for heating, so the hvac_modes
After a restart of home assistant or Schedy he don’t pickup the schedule.
Am i the only one with this issue?
@thundergreen watched_entities
are quoted in both of these links:
Finally, we tell Schedy to re-evaluate the room’s schedule when a sensor changes its state. For that, we just add them to the
watched_entities
lists of the particular rooms. Here is an example forliving
, the others are analogous:
Your calendar issue would best be handled with a sensor in HA that’s on as long as the schedule should be active and querying that sensor from the schedule.
@Cinamon This has already been discussed, I’m waiting for permanent storage in AppDaemon 4.0 in order to resolve it. However, Schedy does already keep its state over restarts as long as HA isn’t restarted as well. If you want to forcefully re-apply all schedules after startup, consider the reset_at_startup
setting, however I don’t recommend enabling it due to the reasons mentioned in docs.
@roschi If I put watched intities in or without quotes. I have the same result
2019-11-13 17:09:53.231200 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': 1573662293.019638, 'overlay_active': False}
2019-11-13 17:09:56.023119 INFO bedroom_heating: --- [SP:bedroom_temp_delta] Value for A:climate.air_conditioner_bedroom in R:bedroom is 12.100000000000001.
2019-11-13 17:09:56.024189 INFO bedroom_heating: <-- [SP:bedroom_temp_delta] Sending state to HA: attributes={'min': 12.1, 'avg': 12.1, 'max': 12.1}
2019-11-13 17:10:29.357062 INFO bedroom_heating: --> Attribute 'state' of 'binary_sensor.window_bedroom' changed from 'off' to 'on', reevaluating <Room R:bedroom>.
2019-11-13 17:10:29.361758 INFO bedroom_heating: --- [R:bedroom] Doing schedule re-evaluation in 1 second [reset=False]
2019-11-13 17:10:30.023671 INFO bedroom_heating: --- [R:bedroom] Evaluating room's schedule (reset=False, force_resend=False).
2019-11-13 17:10:30.025763 INFO bedroom_heating: --- [R:bedroom] Assuming it to be 2019-11-13 17:10:30.019638.
2019-11-13 17:10:30.027511 INFO bedroom_heating: --- [R:bedroom] ������ [SUB] <<Schedule 'bedroom'>/1:<Rule with sub <Schedule 'prepend'>>>
2019-11-13 17:10:30.029230 INFO bedroom_heating: --- [R:bedroom] ������ [ACT] <<Schedule 'bedroom'>/1/1:<Rule x='Mark(OFF, Mark.OVERLAY) if not is_empty('...>>
2019-11-13 17:10:30.030764 INFO bedroom_heating: --- [R:bedroom] Initializing expression helper: BasicHelper, order = 0
2019-11-13 17:10:30.032366 INFO bedroom_heating: --- [R:bedroom] Initializing expression helper: PatternHelper, order = 0
2019-11-13 17:10:30.033716 INFO bedroom_heating: --- [R:bedroom] Initializing expression helper: ScheduleHelper, order = 0
2019-11-13 17:10:30.035174 INFO bedroom_heating: --- [R:bedroom] Initializing expression helper: StateHelper, order = 0
2019-11-13 17:10:30.036513 INFO bedroom_heating: --- [R:bedroom] Initializing expression helper: ThermostatExpressionHelper, order = 0
2019-11-13 17:10:30.037769 INFO bedroom_heating: --- [R:bedroom] Initializing expression helper: CustomEnvironmentHelper, order = 1000
2019-11-13 17:10:30.039024 INFO bedroom_heating: --- [R:bedroom] Executing the expression_environment script.
2019-11-13 17:10:30.043518 INFO bedroom_heating: --- [R:bedroom] ������ => Mark(OFF, {'OVERLAY'})
2019-11-13 17:10:30.044608 INFO bedroom_heating: --- [R:bedroom] Final result: OFF
2019-11-13 17:10:30.045631 INFO bedroom_heating: --- [R:bedroom] Result markers: {'OVERLAY'}
2019-11-13 17:10:30.046585 INFO bedroom_heating: --- [R:bedroom] Result didn't change, not setting it again.
2019-11-13 17:10:30.047694 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': 1573662293.019638, 'overlay_active': False}
Config:
bedroom_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:
- v: 21
rules:
# don't turn on when it's > 5 degrees in the bedroom
- x: "Break() if float(state('sensor.temperature_bedroom') or 0) > 21 else Next()"
- weekdays: 1-5
rules:
- rules:
- x: "Next() if heating_mode() != 'All Home' else Break()"
- { start: "06:00", end: "07:00" }
- { start: "22:00", end: "23:59" }
- weekdays: 6-7
rules:
- { start: "06:00", end: "07:00" }
- { start: "22:30", end: "23:59" }
watched_entities:
- input_select.heating_mode
- input_boolean.automated_heating
- sensor.temperature_bedroom
rooms:
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'])"
statistics:
# Pick an arbitrary name for the parameter instance.
bedroom_temp_delta:
# The type of parameter as found in the actor'S documentation.
type: temp_delta
# More parameter-specific settings:
rooms:
bedroom:
Ah! I thought by saying “quoting” you mean referencing. In fact, it doesn’t matter whether you put it in quotes or not.
The issue you’re facing is that your schedule also evaluated to OFF
before you opened the window and Schedy only sends the value when it has changed compared to previous schedule evaluation. You can verify this by changing your schedule so that it evaluates to something different than OFF
and then open the window. Tell me if that did the trick so that I can fix the source code accordingly.
OK! @roschi I think we got it now! I changed the schedule_append from “OFF” to 21. The climate started heating to 21 . Once I opened the window the climate turned off correctly! I think we found the answer.
First link
Second link
I ask, as sometimes it seemed I needed them and at other times not to make it work, but could not work out if there were any rules.
Yes thanks. That is what I have done. Just wondered if there was a way of doing it in-line
I have a template that seems to work as a starting point (comes on for 30 mins before event starts).
{{ (as_timestamp(states.calendar.cal.attributes.start_time) - (0.5 * 60 * 60) <
as_timestamp(now())) and
(as_timestamp(states.calendar.cal.attributes.start_time) > as_timestamp(now())) }}
Cheers
I thought by saying “quoting” you mean referencing. In fact, it doesn’t matter whether you put it in quotes or not.
Regarding the calendar, there are lots of subtleties to be considered when implementing delayed reaction to state changes. Home Assistant already does this quite well with its template sensors and I don’t want to reinvent the wheel. Schedy can be seen as a state mapper (map state+time to state) and that’s it.
OK! @roschi I think we got it now! I changed the schedule_append from “OFF” to 21. The climate started heating to 21 . Once I opened the window the climate turned off correctly! I think we found the answer.
Great, will see how to fix it this weekend.
Hello all,
First, thanks @roschi for this awsome app !
I’m learning it and set this in production since a couple of days instead of automation. My wife has not seen any change in operations, that’s a win
Then, I have a question.
I’m using schedule_snippets
, and I have some cases with redundancy I’d like to avoid.
Here is an example:
schedule_snippets:
planning_chauffage_confort:
- { v: 22, start: "09:00", end: "23:00" }
planning_chauffage_confort_sdb:
- { v: 20, start: "09:00", end: "23:00" }
### other snippets here
You may see that between *confort
and *confort_sdb
only the temp differs.
rooms:
sejour:
### actors bla bla bla here
schedule:
- x: "IncludeSchedule(schedule_snippets['planning_chauffage_confort'])"
- x: "IncludeSchedule(schedule_snippets['planning_chauffage_global'])"
sdb_haut:
### actors bla bla bla here
schedule:
- x: "IncludeSchedule(schedule_snippets['planning_chauffage_confort_sdb'])"
- x: "IncludeSchedule(schedule_snippets['planning_chauffage_global'])"
To have a common schedule_snippet, I tried to include Add(-2)
in the expression for sdb_haut
without luck.
Is it possible please? Then how?
Thanks
Hi @Reynald
There are multiple ways to solve this.
-
It’s possible to inherit values across schedule snippet borders, so you could leave out values from the snippet and specify them in the rooms:
- v: 22 rules: - x: "IncludeSchedule(...)"
-
Alternatively, in your snippet, choose the temperature based on the room name, like so:
- x: "22 if room_name in ('foo', 'bar',) else 20" rules: - ...
EDIT: Simplified first variant.
Hi @Roschi,
Thank you very much for your answer. I thought about second solution but was not skilled enough to write it.
Anyway, I really like the first solution! Specifying values in room is great because schedules were nearly the same.
I know this question is 15d old now.
Only thing I can’t get working now is when I mix switches with lights:
I’m setting some schedule for my lights now. I may or may not have a similar problem, but, here is how power plugs switches are handle as light in my HA configuration:
light:
- platform: switch
name: Séjour Cheminée
entity_id: switch.prise_lampe_cheminee
I use the light switch component:
For more power, the Light Template component is powerfull, as you can do sequences when you turn it as a light (Previously I used it as scene “launcher” for lights, but also to group heaters in different rooms also):
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.
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.