@SimonPth wrote:
Hi all
I started off with a Wyze Sense pack, intending to have a bit of a play with just that and the corresponding app. In walks Home Assistant and I have fallen very deep down a rabbit hole that I didn’t even know existed.
Basically I have Home Assistant running very nicely on a RPi 3B+, with my Wyze Sense sensors doing their thing.
I recently installed the ESPHome add-on, flashed up a ESP8266 that’s connected to a relay module, which, in turn, drives the OSC (OpenStopClose) contact on my garage door.
This works flawlessly. I can open my garage door using a toggle, which, after 2.seconds, resets back to off, to reset the relay for the next time I want to open/close the door.
I then installed the very handy Google Assistant Webserver add-on, hacked a Wyze Sense door contact together with a normally closed pushbutton, and voila, I have my Google Homes announcing when someone presses my homebrew doorbell.
Using this, I can now open my garage door via voice commands too.
Which leads me to my eventual (very slight) issue.
Since I’m using the ESP8266 to drive a relay, which has a 2 second delay and sets itself back to zero, I have to issue Google with the command “Turn on the garage door” or better, "Activate the garage door.
I’ve since discovered the covers template and implemented that, which gives me a decent graphic, up/down arrows and a stop button.
I can now issue an “Open the garage door” and google will happily reply with “Alright, opening the garage door”
But the graphic never changes, and the up arrow on the Lovelace page is always greyed out. Also, the garage door symbol never changes to open.
When I tell Google to “Close the garage door”, she dutifully replies with "Alright “OPENING the garage door”. And the garage door closes.There is 1 Wyze contact on the garage door that closes when the garage door is closed, and is open at any other position.
Obviously something is wrong in my code somewhere and I need a bit of help. This has been a LOT of new information to digest in the week that I’ve had it.
The code for the cover in my configuration.yaml is as follows:
cover: - platform: template covers: garage_door: friendly_name: "Garage Door" position_template: "{{ states('binary_sensor.wyzesense_77825a44') }}" open_cover: service: switch.toggle data: entity_id: switch.garage_door_opener close_cover: service: switch.toggle data: entity_id: switch.garage_door_opener stop_cover: service: switch.toggle data: entity_id: switch.garage_door_opener icon_template: >- {% if states('binary_sensor.wyzesense_77825a44')|float > 0 %} mdi:garage-open {% else %} mdi:garage {% endif %}
Code on the ESP8266 is as follows:
switch: - platform: gpio id: relay pin: number: GPIO0 inverted: False restore_mode: ALWAYS_OFF - platform: template name: "Garage Door Opener" icon: "mdi:garage" turn_on_action: - switch.turn_on: relay - delay: 2s - switch.turn_off: relay
Garage door cover is as follows on Overview.
This is while the door is currently closed, but the arrow states or garage door symbold do not change.
Would appreciate any help, thanks all!
Posts: 1
Participants: 1