From c266583beac236bc1534c9052d7f9987714f6fc2 Mon Sep 17 00:00:00 2001 From: GeoffAtHome Date: Thu, 19 Oct 2023 17:26:34 +0100 Subject: [PATCH] Smart plugs appear as Switches and Binary Sensors (#102112) --- homeassistant/components/geniushub/binary_sensor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/geniushub/binary_sensor.py b/homeassistant/components/geniushub/binary_sensor.py index f00019361e5..a2f71bfd9fe 100644 --- a/homeassistant/components/geniushub/binary_sensor.py +++ b/homeassistant/components/geniushub/binary_sensor.py @@ -9,6 +9,7 @@ from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType from . import DOMAIN, GeniusDevice GH_STATE_ATTR = "outputOnOff" +GH_TYPE = "Receiver" async def async_setup_platform( @@ -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)