Sonoff /eWeLink component for original firmware

Assuming you tested that the switches work by triggering the automation from the HA GUI, you might be asking why your proximity trigger doesn’t fire? Looks like you should remove the quotes around ‘30’ and ‘900’ since numeric_state is comparing numbers, not strings. Best to start a new thread if the question is about triggers (although perhaps you thought there is something special about turning 4ch sonoff on/off - there isn’t). Here’s my automation:

- id: '1560392496406'
  alias: Water zone 1
  trigger:
  - at: 05:00:00
    platform: time
  condition:
  - condition: time
    weekday:
    - sun
    - tue
    - fri
  - condition: template
    value_template: "{{ not (states('sensor.dark_sky_precip_probability')|float > 50 and states('sensor.dark_sky_precip_intensity')|float > 0.1) }}"
  action:
  - data:
      entity_id: switch.10004c1399_1
    service: switch.turn_on

Hello,

Assumed I want the Sonoff Power R2 will automatic switch off after 1 hour of run, or send notification to my phone. Here is my code, anythings wrong?

- id: '1560392496406'
  alias: Auto stop
  trigger:
    platform: time_pattern
    hours: '1'
  condition: state
  entity_id: switch.10004c1399_1
  state: 'on'
  for:
    hours: 1
  action:
  - data:
      entity_id: switch.10004c1399_1
    service: switch.turn_off

thanks

If your switches work outside of that automation, then you just need help getting the automation working. You might find more help in a new thread asking about automations specifically.

in home assistant 0.94.4 python 3.7.3 home assistant say me integration not found

room

Is it possible to do something like this?
Does anyone know the code and how to do it?

Thanks

That looks like a cover component.

and the code behind?

Template cover or MQTT cover.

what I need is, insert the cover but know what the code is and how to do it for example by the blind at 30 percent

Have you got any answer by now? I have the same problem when upgrading to 0.95.1:
General Errors:
- Integration not found: sonoff
Went back to 0.94.4 where, in my case, the custom component workes just as it had before.

Same here.

works in 0.95.4

This is my result when upgrading :thinking: (not using lovelace, still states): 30 This was working well since 0.4 or so, now nothing (beside configuration.yaml)

Hi everyone , please i need your help !

i have installed HA version 0.95.4 and have a problem with sonoff settings …

i get this during the validation process :

!

My configuration.yaml and the custom_component file has the below view :
customcomponents_sonoff|402x371

Anyone with the same problem please …? all my automations which work with sonoff (basic & touch) are off

My problem was solved by rebooting only HA when my sonoff component didn’t load.

It happens sometimes when I do a complete reboot of my system. Started after upgrading to v0.95.x

i find that this component is not really realiable. My automation sometimes would not run without any clear reason. but sometimes it run without a hitch.

really hope someone with the knowledge to carry on the torch. sadly, i am not savy enough to do so. :frowning:

Your automation, does it turn on/off more then one sonoff device?

I had a similar problem and I created a script that the automation executes, in the script I have added a 1 sec delay between every sonoff device call… works rock solid for me!

i have done 3-4 times system reboot also HA , but the problem remains ! in the older version i hadn’t problem , with the same process my custom component folder worked correctly ! why during the validation it can’t find sonoff folder ?

Have you checked that your component folder I correct and re-added your sonoff component so nothing is corrupt?

I am running
Raspberry Pi 3b+
HA 0.95.4
HassOS 2.12 / 167 (32-bit)
Sonoff component: 2019-06-18 Master

We have the same preconditions ,the only difference is that I have installed HassOS (64-bit) . Is it wrong ? don’t ask me why ! i don’t know …i read it somewhere …

Yes i thing that my custom_component folder is correct , i have created it into config folder with name custom_components , then i have created another folder with name " sonoff " and inside this folder i have put 3 . py files ( init.py with 2 underscores left and right , switch.py ,sensor.py ) with relative source code in each file as mentioned here -> https://github.com/peterbuga/HASS-sonoff-ewelink , i can’t understand why after this process my validation fails !

do you see anything of above mentioned which is incorrect ? thanks !