Heaty will die, Schedy be born!

thanks @taste

I traced the temperature of the thermostat and the temp.sensor
The thermostat had 3 degrees more than the sensor (in the middle of the room).
So I want to use the “room temperature” and not the thermostat temperature to start / stop the heating mode.

I dont understand your calculation :smiley:
And dont know how I can integrate it to solve my issue^^

Hello,

I have problem with actor template. Actor should be water heater Tado. Service in HA is:

service: water_heater.set_operation_mode
data:
  entity_id: water_heater.water_heater
  operation_mode: heat

Actor template:

actor_type: generic2
  actor_templates:
    template: water.heater_template
    attributes:
    - attribute: operation_mode
    values:
    - value: ["heat"]
      calls:
      - service: water_heater.set_operation_mode
        include_entity_id: true
    - value: ["off"]
      calls:
      - service: water_heater.set_operation_mode
        include_entity_id: true
    ignore_case: true

Appdaemon log:

2021-03-11 08:50:01	stdout	2021-03-11 09:50:01.262604 ERROR schedy_water: !!! Not initializing this app.
2021-03-11 08:50:01	stdout	expected dict for dictionary value @ data['actor_templates']['values']. Got [{'value': ['heat'], 'calls': [{'service': 'water_heater.set_operation_mode', 'include_entity_id': True}]}, {'value': ['off'], 'calls': [{'service': 'water_heater.set_operation_mode', 'include_entity_id': True}]}]
2021-03-11 08:50:01	stdout	expected dict for dictionary value @ data['actor_templates']['template']. Got 'water.heater_template'
2021-03-11 08:50:01	stdout	expected dict for dictionary value @ data['actor_templates']['ignore_case']. Got True
2021-03-11 08:50:01	stdout	2021-03-11 09:50:01.261408 ERROR schedy_water: !!! Configuration error: expected dict for dictionary value @ data['actor_templates']['attributes']. Got [{'attribute': 'operation_mode'}]
2021-03-11 08:50:01	stdout	2021-03-11 09:50:01.258270 INFO schedy_water: *** 
2021-03-11 08:50:01	stdout	2021-03-11 09:50:01.257419 INFO schedy_water: *** Thank you very much and enjoy schedy!
2021-03-11 08:50:01	stdout	2021-03-11 09:50:01.256540 INFO schedy_water: ***   DONATE: https://hass-apps.readthedocs.io/en/stable/#donations
2021-03-11 08:50:01	stdout	2021-03-11 09:50:01.255653 INFO schedy_water: *** Then please consider making a donation.
2021-03-11 08:50:01	stdout	2021-03-11 09:50:01.254820 INFO schedy_water: *** it, ensure continuous development and support?
2021-03-11 08:50:01	stdout	2021-03-11 09:50:01.253976 INFO schedy_water: *** You like this app, want to honor the effort put into
2021-03-11 08:50:01	stdout	2021-03-11 09:50:01.253104 INFO schedy_water: *** 
2021-03-11 08:50:01	stdout	2021-03-11 09:50:01.252159 INFO schedy_water: ***   DOCS: https://hass-apps.readthedocs.io/en/stable/
2021-03-11 08:50:01	stdout	2021-03-11 09:50:01.251115 INFO schedy_water: *** This is an app from the hass-apps package.
2021-03-11 08:50:01	stdout	2021-03-11 09:50:01.250286 INFO schedy_water: *** 
2021-03-11 08:50:01	stdout	2021-03-11 09:50:01.249428 INFO schedy_water: *** Welcome to schedy 0.8.3, running on AppDaemon 4.0.3.
2021-03-11 08:50:01	stdout	2021-03-11 09:50:01.246406 INFO AppDaemon: Initializing app schedy_water using class SchedyApp from module hass_apps_loader

Probably something wrong with attribute… But what?
Can anybody help me?

Thanks

P.S.
I try to make many changes in yaml and this is the best result:

  actor_templates:
    default:
#     By default, an actor inherits its settings from the "default" template.
#     Optionally have this template based on another one.
#     template: water.heater_template
      attributes:
       - attribute: operation_mode
      values:
      - value: ["heat"]
        calls:
        - service: water_heater.set_operation_mode
          include_entity_id: true
      - value: ["off"]
        calls:
        - service: water_heater.set_operation_mode
          include_entity_id: true
      ignore_case: true

and log

2021-03-11 12:06:03	stdout	2021-03-11 13:06:03.012213 WARNING HASS: Code: 400, error: 400: Bad Request
2021-03-11 12:06:03	stdout	2021-03-11 13:06:03.011893 WARNING HASS: Error calling Home Assistant service default/water_heater/set_operation_mode
2021-03-11 12:06:03	stdout	2021-03-11 13:06:03.005004 WARNING schedy_water: !!! [R:tepl�� voda] [A:water_heater.tepla_voda] Re-sending value due to missing confirmation.
2021-03-11 12:05:33	stdout	2021-03-11 13:05:33.012872 WARNING HASS: Code: 400, error: 400: Bad Request
2021-03-11 12:05:33	stdout	2021-03-11 13:05:33.012561 WARNING HASS: Error calling Home Assistant service default/water_heater/set_operation_mode
2021-03-11 12:05:33	stdout	2021-03-11 13:05:33.005433 WARNING schedy_water: !!! [R:tepl�� voda] [A:water_heater.tepla_voda] Re-sending value due to missing confirmation.
2021-03-11 12:05:31	stdout	2021-03-11 13:05:31.557337 INFO AppDaemon: Found 3 total apps
2021-03-11 12:05:31	stdout	2021-03-11 13:05:31.556880 INFO AppDaemon: /conf/apps/schedy_water.yaml added or modified
2021-03-11 12:05:31	stdout	2021-03-11 13:05:31.465056 INFO AppDaemon: Reading config
2021-03-11 12:05:03	stdout	2021-03-11 13:05:03.012026 WARNING HASS: Code: 400, error: 400: Bad Request
2021-03-11 12:05:03	stdout	2021-03-11 13:05:03.011718 WARNING HASS: Error calling Home Assistant service default/water_heater/set_operation_mode
2021-03-11 12:05:03	stdout	2021-03-11 13:05:03.004996 WARNING schedy_water: !!! [R:tepl�� voda] [A:water_heater.tepla_voda] Re-sending value due to missing confirmation.
2021-03-11 12:04:33	stdout	2021-03-11 13:04:33.012166 WARNING HASS: Code: 400, error: 400: Bad Request
2021-03-11 12:04:33	stdout	2021-03-11 13:04:33.011836 WARNING HASS: Error calling Home Assistant service default/water_heater/set_operation_mode
2021-03-11 12:04:33	stdout	2021-03-11 13:04:33.004967 WARNING schedy_water: !!! [R:tepl�� voda] [A:water_heater.tepla_voda] Re-sending value due to missing confirmation.
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.081707 INFO schedy_water: *** Initialization done.
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.071632 INFO schedy_water: <-- [R:tepl�� voda] Value set to ('heat',).  [scheduled]
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.068536 WARNING HASS: Code: 400, error: 400: Bad Request
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.068223 WARNING HASS: Error calling Home Assistant service default/water_heater/set_operation_mode
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.030198 INFO schedy_water: --> [R:tepl�� voda] [A:water_heater.tepla_voda] Received value of ('off',).
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.021035 INFO schedy_water: --- Actor type is: 'generic2'
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.016455 INFO schedy_water: *** 
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.015528 INFO schedy_water: *** Thank you very much and enjoy schedy!
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.014619 INFO schedy_water: ***   DONATE: https://hass-apps.readthedocs.io/en/stable/#donations
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.013664 INFO schedy_water: *** Then please consider making a donation.
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.012694 INFO schedy_water: *** it, ensure continuous development and support?
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.011764 INFO schedy_water: *** You like this app, want to honor the effort put into
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.010792 INFO schedy_water: *** 
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.009779 INFO schedy_water: ***   DOCS: https://hass-apps.readthedocs.io/en/stable/
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.008711 INFO schedy_water: *** This is an app from the hass-apps package.
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.007647 INFO schedy_water: *** 
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.006349 INFO schedy_water: *** Welcome to schedy 0.8.3, running on AppDaemon 4.0.3.
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.002943 INFO AppDaemon: Initializing app schedy_water using class SchedyApp from module hass_apps_loader

When I downgraded to previous HA version it works.

Hi @Timsche2210

This problem you need to solve outside Schedy. What thermostat are you using?
The generic thermostat allows you to define which sensor to use: https://www.home-assistant.io/integrations/generic_thermostat/
If you can use this one you can use your accurate sensor and the switch that controls your heating. If you use another thermostat integration you need to get creative with templating

@taste
thanks for your support :slight_smile:
I use the Fritz AVM301 as thermostat and for tracking temperature the xiaomi aqara WSDCGQ11LM.

Later I will have in my sleeping room to the heater an additional air-con (hope in 2-3 weeks), so I need a second generic-theromstat.

is it enough, if I add this code (to my groups.yaml):

#generic climate
climate:
  - platform: generic_thermostat
    name: Climate_Bad
    heater: climate.avm301_dg_bad
    target_sensor: sensor.temp_bad_temperature
  - platform: generic_thermostat
    name: Climate_Buero2
    heater: climate.avm301_dg_buero2
    target_sensor: sensor.temp_buero2_temperature
  - platform: generic_thermostat
    name: Climate_Schlafzimmer
    heater: climate.avm301_dg_schlafzimmer
    target_sensor: sensor.temp_schlafzimmer_temperature

so schedy can use the new entitity with the unique_id, if I change

    Bad:
      rescheduling_delay: 120
      actors:
        climate.avm301_dg_bad:

to

      actors:
        Climate_Bad

or should I change more?

Edit:
I’v got this error:


what I have to change that the group works?

No this is not right but we should not discuss this in the Schedy topic. Can you continue this duscussion in the configuration topic: https://community.home-assistant.io/c/configuration

Hello,

It seems that if I have a range that ends at 10.30 and another that starts at 10.30 it does not work. This is what I would like to use to just change the set temperature.

Do you have any idea why?

Hello,
just started to use schedy - and I’m wondering if is there any “simple” solution to add delay after window open detection and turning off thermostat? And also after closing windows - wait ie. 5 mins before turning on thermostat?

@paszczak You can do this in homeassistant wit an automation. Trigger it when the window/door opens have the wanted delay in the actions and than set a input_boolean. This boolean is used in schedy.

I use this for a dor sensor which turns off schedy when open for >1 minute and re-enables when closed for 2.5 minutes

1 Like

You can create fake window binary sensor to handle such situation and then this one to be used in Schedy.
Quite simple, no automation.

platform: template
sensors:
  bedroom_window_delayed:
    friendly_name: "Delayed bedroom window"
    #window_room: bedroom
    delay_on:
      seconds: 20
    delay_off:
      seconds: 20
    value_template: >-
      {{ is_state('binary_sensor.0x00158d0001f406fb_contact', 'on') }}
1 Like

GUI… So I opted for another simpler and more concise approach which will consist in using the input_datetime: of the beginning and end of the range to activate a binary_sensor: which will switch ON if the range is activated.

From there in Schedy, we change the set temperature (input_number:) of the range, if the range is activated (input_boolean:) and the active period (binary_sensor:).

@TriStone cool did not know you could use delay in a binary_seonsor :smiley:

I need help with actor templates for water heater:

  actor_templates:
    default:
#     By default, an actor inherits its settings from the "default" template.
#     Optionally have this template based on another one.
#     template: water.heater_template
      attributes:
       - attribute: operation_mode
      values:
      - value: ["heat"]
        calls:
        - service: water_heater.set_operation_mode
          include_entity_id: true
      - value: ["off"]
        calls:
        - service: water_heater.set_operation_mode
          include_entity_id: true
      ignore_case: true

and log

2021-03-11 12:06:03	stdout	2021-03-11 13:06:03.012213 WARNING HASS: Code: 400, error: 400: Bad Request
2021-03-11 12:06:03	stdout	2021-03-11 13:06:03.011893 WARNING HASS: Error calling Home Assistant service default/water_heater/set_operation_mode
2021-03-11 12:06:03	stdout	2021-03-11 13:06:03.005004 WARNING schedy_water: !!! [R:tepl�� voda] [A:water_heater.tepla_voda] Re-sending value due to missing confirmation.
2021-03-11 12:05:33	stdout	2021-03-11 13:05:33.012872 WARNING HASS: Code: 400, error: 400: Bad Request
2021-03-11 12:05:33	stdout	2021-03-11 13:05:33.012561 WARNING HASS: Error calling Home Assistant service default/water_heater/set_operation_mode
2021-03-11 12:05:33	stdout	2021-03-11 13:05:33.005433 WARNING schedy_water: !!! [R:tepl�� voda] [A:water_heater.tepla_voda] Re-sending value due to missing confirmation.
2021-03-11 12:05:31	stdout	2021-03-11 13:05:31.557337 INFO AppDaemon: Found 3 total apps
2021-03-11 12:05:31	stdout	2021-03-11 13:05:31.556880 INFO AppDaemon: /conf/apps/schedy_water.yaml added or modified
2021-03-11 12:05:31	stdout	2021-03-11 13:05:31.465056 INFO AppDaemon: Reading config
2021-03-11 12:05:03	stdout	2021-03-11 13:05:03.012026 WARNING HASS: Code: 400, error: 400: Bad Request
2021-03-11 12:05:03	stdout	2021-03-11 13:05:03.011718 WARNING HASS: Error calling Home Assistant service default/water_heater/set_operation_mode
2021-03-11 12:05:03	stdout	2021-03-11 13:05:03.004996 WARNING schedy_water: !!! [R:tepl�� voda] [A:water_heater.tepla_voda] Re-sending value due to missing confirmation.
2021-03-11 12:04:33	stdout	2021-03-11 13:04:33.012166 WARNING HASS: Code: 400, error: 400: Bad Request
2021-03-11 12:04:33	stdout	2021-03-11 13:04:33.011836 WARNING HASS: Error calling Home Assistant service default/water_heater/set_operation_mode
2021-03-11 12:04:33	stdout	2021-03-11 13:04:33.004967 WARNING schedy_water: !!! [R:tepl�� voda] [A:water_heater.tepla_voda] Re-sending value due to missing confirmation.
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.081707 INFO schedy_water: *** Initialization done.
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.071632 INFO schedy_water: <-- [R:tepl�� voda] Value set to ('heat',).  [scheduled]
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.068536 WARNING HASS: Code: 400, error: 400: Bad Request
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.068223 WARNING HASS: Error calling Home Assistant service default/water_heater/set_operation_mode
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.030198 INFO schedy_water: --> [R:tepl�� voda] [A:water_heater.tepla_voda] Received value of ('off',).
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.021035 INFO schedy_water: --- Actor type is: 'generic2'
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.016455 INFO schedy_water: *** 
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.015528 INFO schedy_water: *** Thank you very much and enjoy schedy!
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.014619 INFO schedy_water: ***   DONATE: https://hass-apps.readthedocs.io/en/stable/#donations
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.013664 INFO schedy_water: *** Then please consider making a donation.
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.012694 INFO schedy_water: *** it, ensure continuous development and support?
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.011764 INFO schedy_water: *** You like this app, want to honor the effort put into
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.010792 INFO schedy_water: *** 
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.009779 INFO schedy_water: ***   DOCS: https://hass-apps.readthedocs.io/en/stable/
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.008711 INFO schedy_water: *** This is an app from the hass-apps package.
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.007647 INFO schedy_water: *** 
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.006349 INFO schedy_water: *** Welcome to schedy 0.8.3, running on AppDaemon 4.0.3.
2021-03-11 12:04:03	stdout	2021-03-11 13:04:03.002943 INFO AppDaemon: Initializing app schedy_water using class SchedyApp from module hass_apps_loader

Probably bad template…

Da die Thermostate direkt über die integrierte Temperatur gesteuert werden, kannst du keine direkte Verknüpfung einrichten. Macht eigentlich auch nicht wirklich Sinne. Du kannst mit den externen Sensoren überprüfen ob die Temperatur Steuerung funktioniert wie gewünscht. Hab auch erst gedacht, dass es geht. Ist aber nicht sinnvoll.

In der Schedy Anleitung ist ein Beispiel wie die Steuerung von anderen Sensoren gesteuert werden kann.

schedule:

  • v: “on”
    rules:

    don’t turn on when it’s > 5 degrees outside

    • x: “Break() if float(state(‘sensor.outside_temperature’) or 0) > 5 else Next()”

    don’t turn on when in away mode

    • x: “Break() if is_on(‘input_boolean.away’) else Next()”

    on weekends and during holidays, turn on from 09:00 to 10:30

    • rules:
      • x: “Next() if is_on(‘input_boolean.holidays’) else Break()”
        weekdays: “!6-7”
      • { start: “09:00”, end: “10:30” }

    on normal working days, turn on from 06:30 to 07:00

    • weekdays: 1-5
      rules:
      • { start: “06:30”, end: “07:00”}

at all other times, turn off

  • v: ‘off’

watched_entities:

  • “sensor.outside_temperature”
  • “input_boolean.away”
  • “input_boolean.holidays”

Solution:
I don’t know why, but in the AppDeamon config the entry was gone:

python_packages:
  - hass-apps

I added it and now everything works again. :slight_smile:


Hello, for some weeks my heating plans worked great. Now I have updated core and supervisor and now shedy_heating does not work anymore. I haven’t changed anything in the config.
Here are my logs:

2021-04-11 18:44:23.212490 INFO HASS: Connected to Home Assistant 2021.4.3
2021-04-11 18:44:25.663365 INFO HASS: Evaluating startup conditions
2021-04-11 18:44:25.774302 INFO HASS: Startup condition met: hass state=RUNNING
2021-04-11 18:44:25.776189 INFO HASS: All startup conditions met
2021-04-11 18:44:26.055888 INFO AppDaemon: Processing restart for HASS
2021-04-11 18:44:26.058114 INFO AppDaemon: Terminating schedy_heating
2021-04-11 18:44:26.064434 INFO AppDaemon: Terminating hello_world
2021-04-11 18:44:26.069760 INFO AppDaemon: Terminating aqara
2021-04-11 18:44:26.073357 INFO AppDaemon: Initializing app schedy_heating using class SchedyApp from module hass_apps_loader
2021-04-11 18:44:26.090489 WARNING schedy_heating: ------------------------------------------------------------
2021-04-11 18:44:26.092239 WARNING schedy_heating: Unexpected error initializing app: schedy_heating:
2021-04-11 18:44:26.093673 WARNING schedy_heating: ------------------------------------------------------------
2021-04-11 18:44:26.095738 WARNING schedy_heating: Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/appdaemon/app_management.py", line 996, in check_app_updates
    await self.init_object(app)
  File "/usr/lib/python3.8/site-packages/appdaemon/app_management.py", line 315, in init_object
    modname = await utils.run_in_executor(self, __import__, app_args["module"])
  File "/usr/lib/python3.8/site-packages/appdaemon/utils.py", line 299, in run_in_executor
    response = future.result()
  File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/appdaemon/apps/hass_apps_loader.py", line 3, in <module>
    from hass_apps.loader import *
ModuleNotFoundError: No module named 'hass_apps'
2021-04-11 18:44:26.096552 WARNING schedy_heating: ------------------------------------------------------------
2021-04-11 18:44:26.101750 INFO AppDaemon: Initializing app hello_world using class HelloWorld from module hello
2021-04-11 18:44:26.110052 INFO AppDaemon: Initializing app aqara using class Aqara from module aqara
2021-04-11 18:44:26.119298 WARNING AppDaemon: Unable to find module schedy_heating - initialize() skipped
2021-04-11 18:44:26.130221 INFO hello_world: Hello from AppDaemon
2021-04-11 18:44:26.134701 INFO hello_world: You are now ready to run Apps!
1 Like

Thank you so much Flo,

i had the same issue since a update and was not able to figure it out. Even my zwave network crashed due to this issue.

Your fix worked out!

1 Like

For some reason scheady heating crashes with the following exception:

2021-04-29 09:34:13.893817 WARNING schedy_heating: ------------------------------------------------------------
2021-04-29 09:34:13.896502 WARNING schedy_heating: Unexpected error running initialize() for schedy_heating
2021-04-29 09:34:13.897578 WARNING schedy_heating: ------------------------------------------------------------
2021-04-29 09:34:13.903610 WARNING schedy_heating: Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/appdaemon/app_management.py", line 161, in initialize_app
    await utils.run_in_executor(self, init)
  File "/usr/lib/python3.8/site-packages/appdaemon/utils.py", line 299, in run_in_executor
    response = future.result()
asyncio.exceptions.TimeoutError

debug is set to true, but there is no further output in the logs.
I’m running the latest AppDaemon 4 (0.6.0).

1 Like

Same here. :frowning:

1 Like

Hello,

Just checking to see what devices everyone uses to control their furnace and AC?

I’m looking for something that is a diy option,

Thanks,