6363 get_virtual_component_ids ,
6464 get_virtual_component_unit ,
6565 is_rpc_wifi_stations_disabled ,
66+ is_view_for_platform ,
6667)
6768
6869PARALLEL_UPDATES = 0
@@ -1385,10 +1386,16 @@ def __init__(
13851386 "text" : RpcSensorDescription (
13861387 key = "text" ,
13871388 sub_key = "value" ,
1389+ removal_condition = lambda config , _status , key : not is_view_for_platform (
1390+ config , key , SENSOR_PLATFORM
1391+ ),
13881392 ),
13891393 "number" : RpcSensorDescription (
13901394 key = "number" ,
13911395 sub_key = "value" ,
1396+ removal_condition = lambda config , _status , key : not is_view_for_platform (
1397+ config , key , SENSOR_PLATFORM
1398+ ),
13921399 unit = get_virtual_component_unit ,
13931400 device_class_fn = lambda config : ROLE_TO_DEVICE_CLASS_MAP .get (config ["role" ])
13941401 if "role" in config
@@ -1397,6 +1404,9 @@ def __init__(
13971404 "enum" : RpcSensorDescription (
13981405 key = "enum" ,
13991406 sub_key = "value" ,
1407+ removal_condition = lambda config , _status , key : not is_view_for_platform (
1408+ config , key , SENSOR_PLATFORM
1409+ ),
14001410 options_fn = lambda config : config ["options" ],
14011411 device_class = SensorDeviceClass .ENUM ,
14021412 ),
0 commit comments