File tree 3 files changed +6
-6
lines changed
homeassistant/components/zha
3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ def members(self) -> list[ZHAGroupMember]:
154
154
"""Return the ZHA devices that are members of this group."""
155
155
return [
156
156
ZHAGroupMember (self , self ._zha_gateway .devices [member_ieee ], endpoint_id )
157
- for (member_ieee , endpoint_id ) in self ._zigpy_group .members . keys ()
157
+ for (member_ieee , endpoint_id ) in self ._zigpy_group .members
158
158
if member_ieee in self ._zha_gateway .devices
159
159
]
160
160
Original file line number Diff line number Diff line change @@ -136,12 +136,12 @@ def cluster_command_schema_to_vol_schema(schema: CommandSchema) -> vol.Schema:
136
136
137
137
def schema_type_to_vol (field_type : Any ) -> Any :
138
138
"""Convert a schema type to a voluptuous type."""
139
- if issubclass (field_type , enum .Flag ) and len ( field_type .__members__ . keys ()) :
139
+ if issubclass (field_type , enum .Flag ) and field_type .__members__ :
140
140
return cv .multi_select (
141
- [key .replace ("_" , " " ) for key in field_type .__members__ . keys () ]
141
+ [key .replace ("_" , " " ) for key in field_type .__members__ ]
142
142
)
143
- if issubclass (field_type , enum .Enum ) and len ( field_type .__members__ . keys ()) :
144
- return vol .In ([key .replace ("_" , " " ) for key in field_type .__members__ . keys () ])
143
+ if issubclass (field_type , enum .Enum ) and field_type .__members__ :
144
+ return vol .In ([key .replace ("_" , " " ) for key in field_type .__members__ ])
145
145
if (
146
146
issubclass (field_type , zigpy .types .FixedIntType )
147
147
or issubclass (field_type , enum .Flag )
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ async def async_get_triggers(
92
92
return []
93
93
94
94
triggers = []
95
- for trigger , subtype in zha_device .device_automation_triggers . keys () :
95
+ for trigger , subtype in zha_device .device_automation_triggers :
96
96
triggers .append (
97
97
{
98
98
CONF_DEVICE_ID : device_id ,
You can’t perform that action at this time.
0 commit comments