Nefit on/off when opening /closing a door

Hi all,

What I really would like is an automation for my Nefit thermostat / CV.
1.When the door is open for 2 minutes the CV has to be turn off or lower the heat.
2.The second automation is when the door is closed again the CV has to be going to the default setting. Here starts my problem. You have a ‘program’ what the thermostat was following, but there is also a ‘manually’ setting (you can manually set the temperature higher of lower). So what I want is when the door is closed the thermostat is actually going to the setting of the moment before te door opened.

I made a automation and the first part is working nice. When my door is opened the Nefit will go to 15 degrees (first I wanted it to turn off but I couldn’t found this)
But the second part of the automation isn’t working and I would appreciated your help.

Thanks is advange
Bastiaan1977

- id: '1616413746874'
  alias: CV uit als schuifpui open is
  description: ''
  trigger:
  - type: opened
    platform: device
    device_id: d8faa9f161b3b33e3ebb03627b19d935
    entity_id: binary_sensor.schuifpui_sensor20_23816922_ias_zone
    domain: binary_sensor
    for:
      hours: 0
      minutes: 2
      seconds: 0
      milliseconds: 0
  condition: []
  action:
  - service: climate.set_temperature
    target:
      entity_id: climate.nefit
    data:
      temperature: 15
  mode: single
- id: '1616414006504'
  alias: CV aan als schuifpui dicht is
  description: ''
  trigger:
  - type: not_opened
    platform: device
    device_id: d8faa9f161b3b33e3ebb03627b19d935
    entity_id: binary_sensor.schuifpui_sensor20_23816922_ias_zone
    domain: binary_sensor
    for:
      hours: 0
      minutes: 1
      seconds: 0
      milliseconds: 0
  condition: []
  action:
  - device_id: c83324ff0b3f42dbf82066026520819d
    domain: climate
    entity_id: climate.nefit
    type: set_hvac_mode
    hvac_mode: heat
  mode: single

Try editing the yaml and change the trigger:

  - platform: state
    entity_id:
      - binary_sensor.0x00158d000323b3fd_occupancy 
      - binary_sensor.0x00158d00032008b1_contact 
    to: 'on'

And off for the second automation.

Edit: Nevermind, disregard what i suggested.

Hi @mcarty ,

Thanks for your comment. I have tried it but I can’t get it working.
Do I have to change the two binary sensors (0x00158…_occupancy and _contact) to my sensors?

Thanks

That was my code.
In yours should be:

- platform: state
    entity_id:
      - binary_sensor.schuifpui_sensor20_23816922_ias_zone  
    to: 'on'

In the 1st automation. In the second to: ‘off’
I dont think thats the problem anyway.

Take a look at Developer Tools → Template to check whats failing.
What kind of contact sensor do you have? In the ones i have (the xiaomi zigbee ones), they stay on for 2 minutes, which its a problem for some automations.

@mcarty , have tried your code but it’s not working for me. Thanks anyway.
I have a Sonoff SNZB-04 Zigbee doorsensor.

I will keep looking / trying till I have a good working automation.

Thanks!

Hi @Bastiaan1977 ,

The problem is in your HVAC Mode in your last action, nefit does not do anything with this action.
You have to work with a preset_mode:Clock to put your thermostat back in normal operation.
Example:
action:

  • service: climate.set_preset_mode
    data:
    preset_mode: Clock
    target:
    entity_id: climate.nefit
    Good Luck

Edwin

@swalue
Thanks for your reply, I have tried this but it doesn’t work. Although, the HVAC Mode is Clock, but is there somehow a way that the HVAC mode is going to the last setting? Manual for example.
Here is what I want to do:
-when my door is open the Nefit has to be off (or like I have now the temperature is going to 15 degrees) Maybe I have to change this ??
-then when my door is closed again my Nefit has to go to:
1. the clock setting or
2. the manual temperature that was set before the door was opened.

I hope that you can help me with this. Here are my current setting2 is yaml:

- id: '1616413746874'
  alias: CV uit als schuifpui open is
  description: ''
  trigger:
  - type: opened
    platform: device
    device_id: d8faa9f161b3b33e3ebb03627b19d935
    entity_id: binary_sensor.schuifpui_sensor20_23816922_ias_zone
    domain: binary_sensor
    for:
      hours: 0
      minutes: 2
      seconds: 0
      milliseconds: 0
  condition: []
  action:
  - service: climate.set_temperature
    target:
      entity_id: climate.nefit
    data:
      temperature: 15
  mode: single


- id: '1616414006504'
  alias: CV aan als schuifpui dicht is
  description: ''
  trigger:
  - type: not_opened
    platform: device
    device_id: d8faa9f161b3b33e3ebb03627b19d935
    entity_id: binary_sensor.schuifpui_sensor20_23816922_ias_zone
    domain: binary_sensor
    for:
      hours: 0
      minutes: 1
      seconds: 0
      milliseconds: 0
  condition: []
  action:
  - service: climate.set_preset_mode
    target:
      entity_id: climate.nefit
    data:
      preset_mode: Clock
  mode: single

Hi @Bastiaan1977
Even though its and old topic, i was wondering if you managed to fix this, i have the same problem.

Thanks

  • Richard

@RichardBrr

Hi, yes I have an automation that works well. It was a struggle to get it to work but I succeed.

How can I help you?

1 Like

Hi @Mustang1977, the automation itself or a blueprint would be amazing actually :smile: if you care to share that of course

@RichardBrr
Here is my automation yaml. I have got two of them.

alias: CV uit als schuifpui open is
description: ""
trigger:
  - type: opened
    platform: device
    device_id: d8faa9f161b3b33e3ebb03627b19d935
    entity_id: binary_sensor.schuifpui_sensor2_iaszone
    domain: binary_sensor
    for:
      hours: 0
      minutes: 2
      seconds: 0
condition: []
action:
  - device_id: c83324ff0b3f42dbf82066026520819d
    domain: climate
    entity_id: climate.nefit
    type: set_preset_mode
    preset_mode: Manual
  - service: climate.set_temperature
    data:
      temperature: 15
    target:
      entity_id: climate.nefit
mode: single

Second one is to turn on again

alias: CV aan als schuifpui dicht is
description: ""
trigger:
  - type: not_opened
    platform: device
    device_id: d8faa9f161b3b33e3ebb03627b19d935
    entity_id: binary_sensor.schuifpui_sensor2_iaszone
    domain: binary_sensor
    for:
      hours: 0
      minutes: 0
      seconds: 0
condition: []
action:
  - device_id: c83324ff0b3f42dbf82066026520819d
    domain: climate
    entity_id: climate.nefit
    type: set_preset_mode
    preset_mode: Clock
mode: single

Good luck

1 Like

Thanks! much appreciated!

Works like a charm, was playing around with the hvac modes, but seems they are not really supported for the bosch-nefit easy, only has hvac_modes: heat :man_facepalming:

Thanks again, when i have the time i’ll try to create a blueprint out of it

@RichardBrr

Thanks for the reply. Glad I could help you out.

Have a nice day