Closed baughtj closed 2 years ago
I second this request! I would love to get access to these in home assistant. Right now I have created a number of webhook triggers using IFTTT for my door contact closures to trigger and notify HASS whenever there's a change on Wyze. Not the most elegant, but I am hoping it will due until this can be implemented
Unfortunately this cannot be done. Please see this issue: https://github.com/JoshuaMulliken/ha-wyzeapi/issues/320
@YagiBear would you be able to provide a quick guide of your IFTTT Webhook for HA?
@baughtj
First things first I went to my settings, devices, over to the helpers tab and created input_boolean helpers for each one of the sensors I wanted to track. you can set these to hidden, though I like to have them available when the odd sensor gets stuck. I then went into my binary_sensor.yaml and added binary sensors for each input_boolean i created above and linked them (e.g. binary_sensor.front_door_contact). here is what the sensor yaml should look like:
Next you need a webhook endpoint Take a look at the IFTTT integration for incoming webhooks, you will need to setup a webhook endpoint for homeassistant to receive: https://www.home-assistant.io/integrations/ifttt/
Alternatively, you can create a new automation with a webhook as a trigger, you can use the webhook ID (everything after the hyphen e.g. New-Automation-{webhook id} )
once you have a webhook you can go into IFTTT and create a new applet, you will pick Wyze as the trigger, you will link your Wyze account... select when a contact sensor opens (or closes) and choose your sensor.
Next, the action will be webhook > make a web request.
In the URL box, put your home assistant web facing URL with the webhook: www.[your HA URL]/api/webhook/[webhook ID or endpoint] Method should be: POST Content Type: application/json
For Body you will follow this format: For opening a door: { "action": "call_service", "service": "input_boolean.turn_on", "entity_id": "input_boolean.bedroom_door_contact" } or closing a door: { "action": "call_service", "service": "input_boolean.turn_off", "entity_id": "input_boolean.bedroom_door_contact" }
Change the name of your input boolean for each input you are connecting, turn on for open and off for closed.
There is a more complex way to set this up with all sensors and putting the sensor name into the variables but I have yet to do this...
Once all of that is setup you should be ready to go, opening and closing doors should show up in your HA system.
I hope this helps, sorry, I'm not to good at the tutorials. Let me know if you have further questions.
Are there plans for supporting Entry Sensor V2, Climate Sensor, and Motion Sensor V2?