Skip to content

Commit 2cda081

Browse files
authored
Add illuminance sensor for Shelly Plug US Gen4 (#150681)
1 parent 881a0bd commit 2cda081

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

homeassistant/components/shelly/icons.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@
4343
},
4444
"valve_status": {
4545
"default": "mdi:valve"
46+
},
47+
"illuminance_level": {
48+
"default": "mdi:brightness-5"
4649
}
4750
},
4851
"switch": {

homeassistant/components/shelly/sensor.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,6 +1421,14 @@ def __init__(
14211421
entity_category=EntityCategory.DIAGNOSTIC,
14221422
entity_class=RpcBluTrvSensor,
14231423
),
1424+
"illuminance_illumination": RpcSensorDescription(
1425+
key="illuminance",
1426+
sub_key="illumination",
1427+
name="Illuminance Level",
1428+
translation_key="illuminance_level",
1429+
device_class=SensorDeviceClass.ENUM,
1430+
options=["dark", "twilight", "bright"],
1431+
),
14241432
}
14251433

14261434

homeassistant/components/shelly/strings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,13 @@
193193
"opened": "Opened",
194194
"opening": "[%key:common::state::opening%]"
195195
}
196+
},
197+
"illuminance_level": {
198+
"state": {
199+
"dark": "Dark",
200+
"twilight": "Twilight",
201+
"bright": "Bright"
202+
}
196203
}
197204
}
198205
},

0 commit comments

Comments
 (0)