How to set SONOFF SNZB-02 and use it in rules?

Hi guys!

Here is my items setting:

And here is a very simple rule … which does not work

triggers:
  - id: "1"
    configuration:
      itemName: TEMPSALON_Temperature
      state: ""
    type: core.ItemStateUpdateTrigger
conditions:
  - inputs: {}
    id: "3"
    configuration:
      itemName: TEMPSALON_Temperature
      state: "22"
      operator: <
    type: core.ItemStateCondition
actions:
  - inputs: {}
    id: "2"
    configuration:
      itemName: SONOFF4CHPROR32_Switch0
      command: ON
    type: core.ItemCommandAction

Can you help me please? Thanks

Your channel is supplying units. Make your Item into a Number:Temperature type, not a plain Number type.

Thanks for your help rossko57

I have already tried but without success

I think the problem comes from the transformation JSON

An idea?

Don’t use the profile. No-one said to use the profile.

Ok Rossko57,
Changes are made

So I come back to my rule:

triggers:
  - id: "1"
    configuration:
      itemName: TEMPSDB_Temperature
      state: ""
    type: core.ItemStateUpdateTrigger
conditions:
  - inputs: {}
    id: "3"
    configuration:
      itemName: TEMPMAX_Temperature
      state: "22"
      operator: <
    type: core.ItemStateCondition
actions:
  - inputs: {}
    id: "2"
    configuration:
      itemName: SONOFF4CHPROR32_Switch0
      command: ON
    type: core.ItemCommandAction

But she does not work…

An idea please? Thank you

Does your Item get any knid of update now? Does your rule fire with no condition?

Hi,
I’m new to openHab and have problems to get my sonoff snzb-02 Temprature thing into openHAB. @Nicolas_Thellier can You tell me how you managed to add them as things and configured your channels? Maybe you couls post your code file? This would be very helpfull for me.
I managed to install mosquitto and zigbee2MQTT and both are runing. I can see the temperature sensors at the webinterface of zigbee2MQTT. I’ve tryed to follow these tutorial, (openHAB 3 - Zigbee über MQTT steuern - Hoerli.NET ← german) and tryed to change the Thing files of this post to my belogings: Sonoff Zigbee (SNZB) Sensors & Switches with Zigbee2MQTT But it’s not workng… realy have no Idea why? Thanks

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.