Hi,
I am new to home assistant / esphome / nabu casa, so please be genteel. I created a small garage door interface using ESPhome. The hardware is Wemos D1 Mini, a Relay shield, a DHT22, and a switch. Here is the code:
substitutions:
device_name: esp_garage
update_interval: 30s
esphome:
name: ${device_name}
platform: ESP8266
board: d1_mini
wifi:
ssid: "XXXXXXXXX"
password: "XXXXXXXX"
ap:
ssid: "ESP Garage"
password: "XXXXXXXXXXX"
status_led:
pin:
number: D4
inverted: yes
web_server:
port: 80
sensor:
- platform: dht
pin: D2
temperature:
filters:
- lambda: return x * (9.0/5.0) + 32.0;
unit_of_measurement: "°F"
name: "Garage Temperature"
humidity:
name: "Garage Humidity"
update_interval: ${update_interval}
model: DHT22
- platform: wifi_signal
name: "Garage WiFi Signal"
update_interval: 60s
- platform: uptime
name: "Uptime"
binary_sensor:
- platform: gpio
name: "Garage Door Switch"
pin:
number: D3
inverted: True
switch:
- platform: gpio
pin: D1
id: switch_relay
- platform: template
name: "Garage Door"
icon: "mdi:garage"
turn_on_action:
- switch.turn_off: switch_relay
- switch.turn_on: switch_relay
- delay: 1s
- switch.turn_off: switch_relay
captive_portal:
logger:
api:
ota:
And in the Home Assistant page it looks like this:
It works well from the page interface and even from the device itself since I set a page accessible from the lan using the IP.
I signed up for Nabu casa and I set up two google home routines that basically do the same thing but are triggered by either âOpen garage doorâ or âClose garage doorâ and I hear the corresponding answers. That parts works well. In the google home app I see the switch, but the other sensors are not present (temperature, humidity, and the switch state). The switch tells me if the garage door is open or close.
I would like to be able to ask the google assistant: âHey google, is the garage door open (or close)?â and I would like to hear something like: âYes (or no), the garage door is openâ or âNo (or yes), the garage door is closedâ based on the state of the switch. A bonus would be getting the garage temperature and humidity, but not as important as the switch. Is this doable? If so, can you please explain how to me like iâm 5. My setup is extremely vanilla. I just started on this about 5 days ago.