mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Fix missing Shelly external input (#47028)
* Add support for external input (Shelly 1/1pm add-on) * Make external sensor naming consistent * Fix case consistency
This commit is contained in:
parent
47938a1355
commit
65a2f07a01
@ -73,6 +73,11 @@ SENSORS = {
|
||||
default_enabled=False,
|
||||
removal_condition=is_momentary_input,
|
||||
),
|
||||
("sensor", "extInput"): BlockAttributeDescription(
|
||||
name="External Input",
|
||||
device_class=DEVICE_CLASS_POWER,
|
||||
default_enabled=False,
|
||||
),
|
||||
("sensor", "motion"): BlockAttributeDescription(
|
||||
name="Motion", device_class=DEVICE_CLASS_MOTION
|
||||
),
|
||||
@ -86,7 +91,7 @@ REST_SENSORS = {
|
||||
default_enabled=False,
|
||||
),
|
||||
"fwupdate": RestAttributeDescription(
|
||||
name="Firmware update",
|
||||
name="Firmware Update",
|
||||
icon="mdi:update",
|
||||
value=lambda status, _: status["update"]["has_update"],
|
||||
default_enabled=False,
|
||||
|
@ -133,7 +133,7 @@ SENSORS = {
|
||||
available=lambda block: block.sensorOp == "normal",
|
||||
),
|
||||
("sensor", "extTemp"): BlockAttributeDescription(
|
||||
name="Temperature",
|
||||
name="External Temperature",
|
||||
unit=temperature_unit,
|
||||
value=lambda value: round(value, 1),
|
||||
device_class=sensor.DEVICE_CLASS_TEMPERATURE,
|
||||
@ -155,7 +155,7 @@ SENSORS = {
|
||||
icon="mdi:angle-acute",
|
||||
),
|
||||
("relay", "totalWorkTime"): BlockAttributeDescription(
|
||||
name="Lamp life",
|
||||
name="Lamp Life",
|
||||
unit=PERCENTAGE,
|
||||
icon="mdi:progress-wrench",
|
||||
value=lambda value: round(100 - (value / 3600 / SHAIR_MAX_WORK_HOURS), 1),
|
||||
|
Loading…
x
Reference in New Issue
Block a user