vincentwolsink / home_assistant_micronova_agua_iot

Home Assistant integration controlling heating devices connected via the Agua IOT platform of Micronova
Apache License 2.0
24 stars 15 forks source link

Nordic fire automatic start and set temperature. #129

Closed Pleeriezer closed 5 months ago

Pleeriezer commented 5 months ago

Hello I have a Nordic Fire Ilvar7 and I want to switch the stove on at a time (and when we are at home) set the temperature to 21C an shut down at a later time.

I have made this script but it is not working because there is no command/service to switch it on :

alias: Pelletkachel 's morgens aan indien aanwezig
description: Switch Pelletkachel to 21°C from 8:00 to 11:30 on weekdays.
trigger:
  - platform: numeric_state
    entity_id: zone.home
    above: 0
    id: aan
  - platform: numeric_state
    entity_id: zone.home
    below: 1
    id: uit
  - platform: time
    at:
      - "8:00:00"
    id: aan
  - platform: time
    at:
      - "11:30:00"
    id: uit
condition:
  - condition: time
    weekday:
      - mon
      - tue
      - wed
      - thu
      - fri
action:
  - choose:
      - conditions:
          - condition: trigger
            id: aan
          - condition: numeric_state
            entity_id: zone.home
            above: 0
          - condition: time
            after: "8:00"
            before: "11:30"
        sequence:
          - service: climate.set_temperature
            target:
              entity_id: climate.thuis
            data:
              temperature: 21
              hvac_mode: heat
      - conditions:
          - condition: trigger
            id: uit
        sequence:
          - service: climate.turn_off
            target:
              entity_id: climate.thuis
            data:
              hvac_mode: "off"

What must I put in the script to get it working?

Thanks and greetings,

Erik.

Pleeriezer commented 5 months ago

Changed it a little bit :

alias: Pelletkachel 's morgens aan indien aanwezig
description: Switch Pelletkachel to 21°C from 8:00 to 11:30 on weekdays.
trigger:
  - platform: numeric_state
    entity_id: zone.home
    above: 0
    id: aan
  - platform: numeric_state
    entity_id: zone.home
    below: 1
    id: uit
  - platform: time
    at:
      - "8:00:00"
    id: aan
  - platform: time
    at:
      - "11:30:00"
    id: uit
condition:
  - condition: time
    weekday:
      - mon
      - tue
      - wed
      - thu
      - fri
action:
  - choose:
      - conditions:
          - condition: trigger
            id: aan
          - condition: numeric_state
            entity_id: zone.home
            above: 0
          - condition: time
            after: "8:00"
            before: "11:30"
        sequence:
          - service: climate.turn_on
            metadata: {}
            data: {}
            target:
              device_id: 128e7440cdfe511358bb71abe9fa506d
          - service: climate.set_temperature
            target:
              entity_id: climate.thuis
            data:
              temperature: 21
              hvac_mode: heat
      - conditions:
          - condition: trigger
            id: uit
        sequence:
          - service: climate.turn_off
            target:
              entity_id: climate.thuis
            data:
              hvac_mode: "off"

Still not working....

vincentwolsink commented 5 months ago

Hi Erik,

You need to use climate.turn_on and target it at entity_id: climate.thuis (assuming that is your pellet stove).

service: climate.turn_on
target:
  entity_id: climate.thuis
Pleeriezer commented 5 months ago

Thanks for the reply,

I choose for the entity of the stove but it still is not working?

alias: Pelletkachel 's morgens aan indien aanwezig
description: Switch Pelletkachel to 21°C from 8:00 to 11:30 on weekdays.
trigger:
  - platform: numeric_state
    entity_id: zone.home
    above: 0
    id: aan
  - platform: numeric_state
    entity_id: zone.home
    below: 1
    id: uit
  - platform: time
    at:
      - "8:00:00"
    id: aan
  - platform: time
    at:
      - "11:30:00"
    id: uit
condition:
  - condition: time
    weekday:
      - mon
      - tue
      - wed
      - thu
      - fri
action:
  - choose:
      - conditions:
          - condition: trigger
            id: aan
          - condition: numeric_state
            entity_id: zone.home
            above: 0
          - condition: time
            after: "8:00"
            before: "11:30"
        sequence:
          - service: climate.turn_on
            metadata: {}
            data: {}
            target:
              device_id: 128e7440cdfe511358bb71abe9fa506d
          - service: climate.set_temperature
            target:
              device_id: 128e7440cdfe511358bb71abe9fa506d
            data:
              temperature: 21
              hvac_mode: heat
      - conditions:
          - condition: trigger
            id: uit
        sequence:
          - service: climate.turn_off
            target:
              entity_id: climate.thuis
            data:
              hvac_mode: "off"
vincentwolsink commented 5 months ago

You didn't choose the entity, you choose the device. See the difference between my snippet of code and yours.

Pleeriezer commented 5 months ago

Thnx again!

Like this :

alias: Pelletkachel 's morgens aan indien aanwezig
description: Switch Pelletkachel to 21°C from 8:00 to 11:30 on weekdays.
trigger:
  - platform: numeric_state
    entity_id: zone.home
    above: 0
    id: aan
  - platform: numeric_state
    entity_id: zone.home
    below: 1
    id: uit
  - platform: time
    at:
      - "8:00:00"
    id: aan
  - platform: time
    at:
      - "11:30:00"
    id: uit
condition:
  - condition: time
    weekday:
      - mon
      - tue
      - wed
      - thu
      - fri
action:
  - choose:
      - conditions:
          - condition: trigger
            id: aan
          - condition: numeric_state
            entity_id: zone.home
            above: 0
          - condition: time
            after: "8:00"
            before: "11:30"
        sequence:
          - service: climate.turn_on
            metadata: {}
            data: {}
            target:
              entity_id: climate.thuis
          - service: climate.set_temperature
            target:
              entity_id: climate.thuis
            data:
              temperature: 21
              hvac_mode: heat
      - conditions:
          - condition: trigger
            id: uit
        sequence:
          - service: climate.turn_off
            target:
              entity_id: climate.thuis
            data:
              hvac_mode: "off"`

Unfortanally it is not working.....

Pleeriezer commented 5 months ago

Another try :

alias: Pelletkachel 's morgens aan indien aanwezig test
description: Switch Pelletkachel to 21°C from 8:00 to 11:30 on weekdays.
trigger:
  - platform: state
    entity_id: zone.home
    to: null
  - platform: time
    at:
      - "8:00:00"
      - "11:30:00"
condition:
  - condition: time
    weekday:
      - mon
      - tue
      - wed
      - thu
      - fri
action:
  - if:
      - condition: numeric_state
        entity_id: zone.home
        above: 0
      - condition: time
        after: "8:00:00"
        before: "11:30:00"
    then:
      - service: climate.set_temperature
        target:
          entity_id: climate.pelletkachel
        data:
          temperature: 21
          hvac_mode: heat
    else:
      - service: climate.turn_off
        target:
          entity_id: climate.pelletkachel
        data: {}

Still not working...

vincentwolsink commented 5 months ago

Does the stove turn on when you turn on the climate manually? If so, see troubleshooting automations

Pleeriezer commented 5 months ago

If I switch it on with card on my dash yes

Pleeriezer commented 5 months ago

It is working now!

Could not find it with the troubleshooting so I try to change the script :

`alias: Pelletkachel 's morgens aan indien aanwezig test description: Switch Pelletkachel to 21°C from 8:00 to 11:30 on weekdays. trigger:

vincentwolsink commented 5 months ago

Good! I saw you had some help on Tweakers too 😉

Pleeriezer commented 5 months ago

Yes, some try to help, and I am happy with it!

Thanks for your help too!

Pleeriezer commented 5 months ago

Mhh still something wrong...

If the stove reaches the 21 degrees it shuts off and even if the temperature drops to 17 degrees it doesn't start again? Do you maybe know what it can be?

vincentwolsink commented 5 months ago

There is no logic for handling temperature changes in your automation, it is purely time based. And to be honest, I would keep the temperature control to the internal thermostat of your stove.

Pleeriezer commented 5 months ago

I agree about the Thermostat but the stove have never done this behaviour before? Normally it will go standby if the temperature is reached and then will go on again 2 degrees below that.

(If I programm it trough the remote control)

And now it is completly shutting down?