Skip to content

Commit

Permalink
Smart plugs appear as Switches and Binary Sensors (home-assistant#102112
Browse files Browse the repository at this point in the history
)
  • Loading branch information
GeoffAtHome authored Oct 19, 2023
1 parent eab4c24 commit c266583
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion homeassistant/components/geniushub/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from . import DOMAIN, GeniusDevice

GH_STATE_ATTR = "outputOnOff"
GH_TYPE = "Receiver"


async def async_setup_platform(
Expand All @@ -26,7 +27,7 @@ async def async_setup_platform(
switches = [
GeniusBinarySensor(broker, d, GH_STATE_ATTR)
for d in broker.client.device_objs
if GH_STATE_ATTR in d.data["state"]
if GH_TYPE in d.data["type"]
]

async_add_entities(switches, update_before_add=True)
Expand Down

0 comments on commit c266583

Please sign in to comment.