Great integration !!
Got a problem using device_internet_access service after version 17.4.
Background:
- AX86U (fw 388.1) as main router aimesh with AC68P (fw 386.9) as node
- Configured AX86U as router, device_tracker, device control checked when set up integration
- Both devices showed in integration and device_tracker.my_laptop.
- my_laptop has been added to Parental Controls - Time Scheduling with no schedule, device_tracker.my_laptop enabled in integration.
service: asusrouter.device_internet_access
data:
entities:
- device_tracker.my_laptop
state: disable
In version 17.4, that worked.
Any version later than 17.4, I got this on screen:
Fail to call service asusrouter.device_internet_access. Unknown error.
and this in log:
This error originated from a custom integration.
Logger: homeassistant.helpers.script.websocket_api_script
Source: custom_components/asusrouter/bridge.py:808
Integration: AsusRouter (documentation, issues)
First occurred: 11:33:25 AM (1 occurrences)
Last logged: 11:33:25 AM
websocket_api script: Error executing script. Unexpected error for call_service at pos 1: 'NoneType' object has no attribute 'replace'
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/helpers/script.py", line 451, in _async_step
await getattr(self, handler)()
File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/helpers/script.py", line 684, in _async_call_service_step
await service_task
File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/core.py", line 1787, in async_call
task.result()
File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/core.py", line 1824, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/home/homeassistant/.homeassistant/custom_components/asusrouter/router.py", line 923, in async_service_device_internet_access
await self.bridge.async_parental_control(raw=service.data)
File "/home/homeassistant/.homeassistant/custom_components/asusrouter/bridge.py", line 808, in async_parental_control
return await self.api.async_set_parental_control_rules(
File "/srv/homeassistant/lib/python3.10/site-packages/asusrouter/asusrouter.py", line 1351, in async_set_parental_control_rules
return await self.async_apply_parental_control_rules(current_rules)
File "/srv/homeassistant/lib/python3.10/site-packages/asusrouter/asusrouter.py", line 1297, in async_apply_parental_control_rules
request = compilers.parental_control(rules)
File "/srv/homeassistant/lib/python3.10/site-packages/asusrouter/util/compilers.py", line 144, in parental_control
timemaps += f"{data[rule].timemap.replace('<', '<')}>"
AttributeError: 'NoneType' object has no attribute 'replace'
If I downgrade back to 17.4, service works with no error.
Any help would be appreciated.