@@ -544,3 +544,64 @@ def test_issue465():
544544 "supported_features" : LightEntityFeature .EFFECT ,
545545 # "xy_color": (0.496, 0.383),
546546 }
547+
548+
549+ def test_issue711 ():
550+ device = {
551+ "id" : "xxx" ,
552+ "name" : "Свет на крыльце" ,
553+ "type" : "devices.types.light" ,
554+ "icon_url" : "https://avatars.mds.yandex.net/get-iot/icons-devices-devices.types.light.svg/orig" ,
555+ "capabilities" : [
556+ {
557+ "reportable" : true ,
558+ "retrievable" : true ,
559+ "type" : "devices.capabilities.on_off" ,
560+ "state_changed_at" : 1761939645.3040287 ,
561+ "last_updated" : 1761977954.1980345 ,
562+ "parameters" : {"split" : false },
563+ "state" : {"instance" : "on" , "value" : false },
564+ },
565+ {
566+ "reportable" : true ,
567+ "retrievable" : false ,
568+ "type" : "devices.capabilities.zigbee_node" ,
569+ "state_changed_at" : 1761978012.2432792 ,
570+ "last_updated" : 1761978012.2432792 ,
571+ "parameters" : {"type" : "router" },
572+ "state" : {
573+ "value" : {
574+ "signal_quality" : {"status" : "ok" , "lqi" : 75 , "rssi" : - 74 }
575+ }
576+ },
577+ },
578+ ],
579+ "properties" : [
580+ {
581+ "type" : "devices.properties.float" ,
582+ "retrievable" : false ,
583+ "reportable" : true ,
584+ "parameters" : {
585+ "instance" : "power" ,
586+ "name" : "потребляемая мощность" ,
587+ "unit" : "unit.watt" ,
588+ "range" : {"min" : 0 , "max" : 3500 , "precision" : 0.1 },
589+ },
590+ "state" : {"percent" : null , "status" : null , "value" : 0 },
591+ "state_changed_at" : "2025-10-31T19:40:46Z" ,
592+ "last_updated" : "2025-11-01T05:38:23Z" ,
593+ }
594+ ],
595+ "skill_id" : "YANDEX_IO" ,
596+ "item_type" : "device" ,
597+ "groups" : [],
598+ }
599+
600+ state = update_ha_state (YandexLight , device )
601+ assert state .state == "off"
602+ assert state .attributes == {
603+ "color_mode" : None ,
604+ "friendly_name" : "Свет на крыльце" ,
605+ "supported_color_modes" : [ColorMode .ONOFF ],
606+ "supported_features" : 0 ,
607+ }
0 commit comments