Thanks, Its working.
I’m having an error. By adding:
Sonoff S22 Switches
input_boolean:
sonoff_switch_2:
name: Home Assistant Switch
initial: off
error:
I was expecting a dictionary for the dictionary value @ data [‘input_boolean’] [‘name’]. It has ‘Home Assistant Switch’. (See C: \ Users \ angel \ AppData \ Roaming \ .homeassistant \ configuration.yaml, line 173). Please check the documents at https://home-assistant.io/components/input_boolean/
Discover the error. in the name part, there should be no spaces. “name: Home_Assistant_Switch”
What to put in?
id: 'some-unique-number’
I have an error in this part …
- action:
- data:
event: sonoff-2-on
service: ifttt.trigger
alias: Home Assistant Switch On
condition: []
id: 'some-unique-number'
trigger:
- entity_id: input_boolean.sonoff_switch_2
from: 'off'
platform: state
to: 'on'
- action:
- data:
event: sonoff-2-off
service: ifttt.trigger
alias: Home Assistant Switch Off
condition: []
id: 'some-unique-number'
trigger:
- entity_id: input_boolean.sonoff_switch_2
from: 'on'
platform: state
to: 'off'
ERRO:
2018-05-15 19:04:18 ERROR (SyncWorker_0) [homeassistant.util.yaml] while parsing a block mapping
in “C:\Users\angel\AppData\Roaming.homeassistant\configuration.yaml”, line 1, column 1
expected , but found ‘’
in “C:\Users\angel\AppData\Roaming.homeassistant\configuration.yaml”, line 178, column 3
2018-05-15 19:04:18 ERROR (MainThread) [homeassistant.bootstrap] Error loading C:\Users\angel\AppData\Roaming.homeassistant\configuration.yaml: while parsing a block mapping
in “C:\Users\angel\AppData\Roaming.homeassistant\configuration.yaml”, line 1, column 1
expected , but found ‘’
in “C:\Users\angel\AppData\Roaming.homeassistant\configuration.yaml”, line 178, column 3
PLEASE guys, format your code properly using the </> button.
Hi trying to use it with IFTTT, but I am a bit lost, configuring IFTTT.
I linked ewelink account with IFTTT, and after that???
Were you unable to follow my blog post linked in my last post?
I don’t get the ifttt part (Google assistant?)
In Home Assistant, you need an automation like this:
- action:
- data:
event: sonoff-2-on
service: ifttt.trigger
alias: Home Assistant Switch On
condition: []
id: 'some-unique-number'
trigger:
- entity_id: input_boolean.sonoff_switch_2
from: 'off'
platform: state
to: 'on'
- action:
- data:
event: sonoff-2-off
service: ifttt.trigger
alias: Home Assistant Switch Off
condition: []
id: 'some-unique-number'
trigger:
- entity_id: input_boolean.sonoff_switch_2
from: 'on'
platform: state
to: 'off'
In configuration.yaml you need to have your IFTTT API key as well. That is the IF part and you send the maker event like sonoff-2-off as per above. The THAT part is eWelink and if you like eWeLink to IFTTT it will ask you to log into eWeLink and you will be able to select the switch from there.
In Google Assistant, it’s totally independent of HA! Google Assistant has native support for eWeLink so just add it and you have voice control.
If you set this up via my blog instructions, and trigger in GA will be reflected in HA frontend.
great it works, like this I can use Google Assistant, HASS, and original Ewelink app. Great!
Now wish to use the energy/power values of the Sonoff POW, any clue?
Any reason you don’t want to flash with Tasmota? I don’t think you can do what you want with IFTTT, EWeLink and GH…
I like the ewelink app, I can easily put timers, check power/energy … I know it can all be programmed by HASS, but it takes a lot of time (for me), and the HASS user interface is UGLY: I know it can be programmed with hadashboard, or similar, but it takes even much more time … I have it all ready with the ewelink app
Of course I miss HASS integration for automation with other components, but its solved with OFTTT, just need now the power.
I really wish for an integration of HASS and ewelink directly
Agreed but I don’t think anyone is working on that. The solution offered is always Tasmota.
HA is really about local control though and it takes less than a minute or two to flash Tasmota, you can check energy and setup timers on the Tasmota GUI itself as well. Given the messages I’ve read of people asking for an API connection with ewelink I wouldn’t expect anything soon.
which guide did you use? I see so many
Quickest is probably the one @DrZzs used for his 4ch though you’ll have to set everything up manually when done including wifi and even timezone. Flip side of that is take a bit of time to build you’re own default bin file so you only have to do 95% of the setup once.
Here’s the link:
I just recorded a short sonoff basic flash video using this method. Hoping to have it edited and posted soon.
Until then this video shows the same method and the description has links to everything you need.
is it possible to use male-female wires to do the flash, I´m not handy soldering things.
Possibly, I’ve done something like this but with female-female wires and I stuck a blank 4 pin header in to the 4 wires to keep them all lined up. I did this same method with the S31 models but with a 6 pin header due to the 2 skipped in the middle.