HASwitchPlate / openHASP-custom-component

Home Assistant custom component for openHASP
https://www.openhasp.com
MIT License
49 stars 9 forks source link

Missing and obsolete events #47

Closed fvanroie closed 3 years ago

fvanroie commented 3 years ago

Version of the custom_component

0.5.0 😃

Configuration

n/a

Describe the bug

hold and release events are missing from the HASP_EVENTS list:

HASP_EVENT = "event"
HASP_EVENT_ON = "on"
HASP_EVENT_OFF = "off"
HASP_EVENT_DOWN = "down"
HASP_EVENT_UP = "up"
HASP_EVENT_SHORT = "short"
HASP_EVENT_LONG = "long"
HASP_EVENT_CHANGED = "changed"
HASP_EVENT_RELEASE = "release"
HASP_EVENTS = (
    HASP_EVENT_ON,
    HASP_EVENT_OFF,
    HASP_EVENT_DOWN,
    HASP_EVENT_UP,
    HASP_EVENT_SHORT,
    HASP_EVENT_LONG,
    HASP_EVENT_CHANGED,
)

Debug log

2021-04-18 03:41:37 WARNING (MainThread) [custom_components.openhasp] Could not handle event '{"event":"hold"}' on 'hasp/lanbon123/state/p1b7'
2021-04-18 03:41:38 WARNING (MainThread) [custom_components.openhasp] Could not handle event '{"event":"release"}' on 'hasp/lanbon123/state/p1b7'

Note

HASP_EVENT_SHORT = "short" doesn't exist anymore and can be removed from the schema.

dgomes commented 3 years ago

Thanks!