Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Events not showing up in event log #25

Open
ImaZen88 opened this issue Mar 27, 2024 · 5 comments
Open

Events not showing up in event log #25

ImaZen88 opened this issue Mar 27, 2024 · 5 comments

Comments

@ImaZen88
Copy link

ImaZen88 commented Mar 27, 2024

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?

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:
      - homeassistant.event:
          event: esphome.wizmote_test
          data:
            mac: !lambda 'return format_hex(data.bssid, 6);'
            button: !lambda 'return data.button - 99;'
            sequence: !lambda 'return data.sequence;'    

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

@ImaZen88
Copy link
Author

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;'

@jesserockz
Copy link
Owner

jesserockz commented Mar 31, 2024

Did you add the device to home assistant?

Open your Home Assistant instance and start setting up a new integration.

@ImaZen8
Copy link

ImaZen8 commented Apr 1, 2024

Hello, Yeah I did (thanks for the response tho)
image
image
image
Events log is blank

@jesserockz
Copy link
Owner

@ImaZen8 None of those screenshots show that you have added the device to Home Assistant.

@avt613
Copy link

avt613 commented Apr 19, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants