Adding type WD to support #4

Closed
alexandre-leites wants to merge 1 commits from main into main
alexandre-leites commented 2023-03-18 17:57:14 +01:00 (Migrated from github.com)
No description provided.
Andre0512 (Migrated from github.com) requested changes 2023-03-19 00:14:37 +01:00
Andre0512 (Migrated from github.com) left a comment

Hey, I think we shouldn't blow this up with duplicated code.
We should make a copy here by adding a line like this after the definition of the entity descriptions:

BINARY_SENSORS["WD"] = BINARY_SENSORS["WM"]

Or just extend it if we use all of the WM definition and add some special WD definitions:

BINARY_SENSORS["WD"] |= BINARY_SENSORS["WM"]

I have seen it's a common way to handle these things in integrations like tuya which inspired me for this hon integration.
Can you change it? 🙂

Hey, I think we shouldn't blow this up with duplicated code. We should make a copy here by adding a line like this after the definition of the entity descriptions: ``` BINARY_SENSORS["WD"] = BINARY_SENSORS["WM"] ``` Or just extend it if we use all of the WM definition and add some special WD definitions: ``` BINARY_SENSORS["WD"] |= BINARY_SENSORS["WM"] ``` I have seen it's a common way to handle these things in integrations like [tuya](https://github.com/home-assistant/core/blob/dev/homeassistant/components/tuya/sensor.py#L1026) which inspired me for this hon integration. Can you change it? :slightly_smiling_face:
alexandre-leites commented 2023-03-22 22:23:36 +01:00 (Migrated from github.com)

Sure, a little busy but I will update whenever I can

Sure, a little busy but I will update whenever I can

Pull request closed

Sign in to join this conversation.
No description provided.