Skip to content

Commit

Permalink
добавление интерфейсов для создания объектов
Browse files Browse the repository at this point in the history
  • Loading branch information
malinovsku committed Aug 19, 2024
1 parent e6016e3 commit 359bbce
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 1 addition & 3 deletions custom_components/keenetic_api/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ class KeeneticBinarySensorEntityDescription(BinarySensorEntityDescription):
}




async def async_setup_entry(
hass: HomeAssistant,
entry: ConfigEntry,
Expand Down Expand Up @@ -125,4 +123,4 @@ def extra_state_attributes(self) -> dict[str, str] | None:
if self.entity_description.attributes_fn is not None:
return self.entity_description.attributes_fn(self.coordinator, self._obj_id)
else:
return None
return None
6 changes: 3 additions & 3 deletions custom_components/keenetic_api/keenetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ class DataRcInterface():
"Wireguard",
"OpenVPN",
"EoIP",
# "GigabitEthernet",
# "Ethernet",
"GigabitEthernet",
"Ethernet",
]

class Router:
Expand Down Expand Up @@ -148,7 +148,7 @@ async def async_setup_obj(self):
data_show_rc_interface_ip_global = await self.show_rc_interface_ip_global()
data_show_interface = await self.show_interface()
for interface, data_interface in data_show_interface.items():
if interface in data_show_rc_interface_ip_global or data_interface.get('type', 'NO') in LIST_INTERFACES:
if interface in data_show_rc_interface_ip_global or (data_interface.get('type', 'NO') in LIST_INTERFACES and data_interface.get('global', False)):
self.request_interface[interface] = f"{data_interface['type']} {data_interface.get('description', '')}"
_LOGGER.debug(f'{self._mac} request_interface - {self.request_interface}')
return True
Expand Down
2 changes: 1 addition & 1 deletion custom_components/keenetic_api/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
"iot_class": "local_polling",
"issue_tracker": "https://github.com/malinovsku/ha-keenetic_api/issues",
"requirements": ["pyqrcode==1.2.1", "pypng==0.20220715.0"],
"version": "0.9"
"version": "0.10b1"
}

0 comments on commit 359bbce

Please sign in to comment.