Open ImaZen88 opened 5 months ago
Here is the original
esphome:
name: wiz-bridge
friendly_name: wiz-bridge
esp32:
board: esp32-s3-devkitc-1
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "1x6vW9uDccJbWrdPja9P0ElthJ7Exd4bc5vYzdhMNHY="
ota:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Wiz-Bridge Fallback Hotspot"
captive_portal:
external_components:
- source: github://jesserockz/wizmote-esphome
components:
- esp_now
- wizmote
esp_now:
wizmote:
on_button:
if:
condition:
lambda: return data.button >= 100 && data.button <= 102;
then:
- homeassistant.event:
event: esphome.wizmote_choose
data:
mac: !lambda 'return format_hex(data.bssid, 6);'
button: !lambda 'return data.button - 99;'
sequence: !lambda 'return data.sequence;'
else:
- homeassistant.event:
event: esphome.wizmote_action
data:
mac: !lambda 'return format_hex(data.bssid, 6);'
button: !lambda 'return data.button;'
sequence: !lambda 'return data.sequence;'
Hello, Yeah I did (thanks for the response tho) Events log is blank
@ImaZen8 None of those screenshots show that you have added the device to Home Assistant.
Looking at #issue 19 helped me...
If you go into "developer tools - events - listen to events" and start listening for esphome.wizmote_action
or esphome.wizmote_choose
then press a button on your remote a few times does anything happen?
Also is the light on the front of the wizmote lighting up?
I have right format for mac address. Logging works normal in esphome integraton. When listening to events, I am listening to * and random 5 minute checkup calls are showing up, so event log is working normally. I got fresh home assistant installation. I tried to remove the condition if it was making sth bad, but that didnt work either. So that must mean the on_button function is not working right?
I should also add, that I am using this for wiz smart button, not wizmote, but the other guy in issues said it works for him so, I'd like to ask what am I doing wrong.
Thanks in advance