mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 13:15:18 +02:00
Improve Vodafone Station empty/unavailable phone number detection (#115696)
Vodafone Sercomm H300S model incorrectly reports phone_unavailable1/phone_unavailable2 flags.
This commit is contained in:
@@ -107,12 +107,12 @@ SENSOR_TYPES: Final = (
|
|||||||
VodafoneStationEntityDescription(
|
VodafoneStationEntityDescription(
|
||||||
key="phone_num1",
|
key="phone_num1",
|
||||||
translation_key="phone_num1",
|
translation_key="phone_num1",
|
||||||
is_suitable=lambda info: info["phone_unavailable1"] == "0",
|
is_suitable=lambda info: info["phone_num1"] != "",
|
||||||
),
|
),
|
||||||
VodafoneStationEntityDescription(
|
VodafoneStationEntityDescription(
|
||||||
key="phone_num2",
|
key="phone_num2",
|
||||||
translation_key="phone_num2",
|
translation_key="phone_num2",
|
||||||
is_suitable=lambda info: info["phone_unavailable2"] == "0",
|
is_suitable=lambda info: info["phone_num2"] != "",
|
||||||
),
|
),
|
||||||
VodafoneStationEntityDescription(
|
VodafoneStationEntityDescription(
|
||||||
key="sys_uptime",
|
key="sys_uptime",
|
||||||
|
Reference in New Issue
Block a user