Comments (3)
I changed line 196 to:
id = parts[0]
and it seems to be working fine now.
hue_target = self._huesyncbox.api.execution.hue_target
was returning a list with one item. Similar to this: ['47XX285f-XXXX-492e-XXXX-51bXXXXa590c']
So string split was not affecting anything and a one item list was being returned.
Looks like the 'Set_entertainment_area" service fails now however....
with this error:
Error log
2021-05-14 03:23:00 ERROR (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Error executing script. Unexpected error for call_service at pos 1: 15: Invalid Value
Traceback (most recent call last):
File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/homeassistant/helpers/script.py", line 363, in _async_step
await getattr(self, handler)()
File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/homeassistant/helpers/script.py", line 563, in _async_call_service_step
await service_task
File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/homeassistant/core.py", line 1481, in async_call
task.result()
File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/homeassistant/core.py", line 1516, in _execute_service
await handler.job.target(service_call)
File "/Volumes/HomeAssistant/custom_components/huesyncbox/__init__.py", line 171, in async_set_entertainment_area
await entry.entity.async_select_entertainment_area(call.data.get(ATTR_ENTERTAINMENT_AREA))
File "/Volumes/HomeAssistant/custom_components/huesyncbox/media_player.py", line 173, in async_select_entertainment_area
await self._huesyncbox.api.execution.set_state(hue_target=group.id)
File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/aiohuesyncbox/execution.py", line 155, in set_state
await self._put(data)
File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/aiohuesyncbox/execution.py", line 35, in _put
await self._request('put', '/execution', data=data)
File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/aiohuesyncbox/huesyncbox.py", line 185, in request
_raise_on_error(data)
File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/aiohuesyncbox/huesyncbox.py", line 195, in _raise_on_error
raise_error(data['code'], data["message"])
File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/aiohuesyncbox/errors.py", line 38, in raise_error
raise cls("{}: {}".format(code, message))
aiohuesyncbox.errors.RequestError: 15: Invalid Value
2021-05-14 03:23:00 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [4684096176] Error handling message: Unknown error
Traceback (most recent call last):
File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/homeassistant/components/websocket_api/decorators.py", line 21, in _handle_async_response
await func(hass, connection, msg)
File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/homeassistant/components/websocket_api/commands.py", line 482, in handle_execute_script
await script_obj.async_run(msg.get("variables"), context=context)
File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/homeassistant/helpers/script.py", line 1209, in async_run
await asyncio.shield(run.async_run())
File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/homeassistant/helpers/script.py", line 345, in async_run
await self._async_step(log_exceptions=False)
File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/homeassistant/helpers/script.py", line 363, in _async_step
await getattr(self, handler)()
File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/homeassistant/helpers/script.py", line 563, in _async_call_service_step
await service_task
File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/homeassistant/core.py", line 1481, in async_call
task.result()
File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/homeassistant/core.py", line 1516, in _execute_service
await handler.job.target(service_call)
File "/Volumes/HomeAssistant/custom_components/huesyncbox/__init__.py", line 171, in async_set_entertainment_area
await entry.entity.async_select_entertainment_area(call.data.get(ATTR_ENTERTAINMENT_AREA))
File "/Volumes/HomeAssistant/custom_components/huesyncbox/media_player.py", line 173, in async_select_entertainment_area
await self._huesyncbox.api.execution.set_state(hue_target=group.id)
File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/aiohuesyncbox/execution.py", line 155, in set_state
await self._put(data)
File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/aiohuesyncbox/execution.py", line 35, in _put
await self._request('put', '/execution', data=data)
File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/aiohuesyncbox/huesyncbox.py", line 185, in request
_raise_on_error(data)
File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/aiohuesyncbox/huesyncbox.py", line 195, in _raise_on_error
raise_error(data['code'], data["message"])
File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/aiohuesyncbox/errors.py", line 38, in raise_error
raise cls("{}: {}".format(code, message))
aiohuesyncbox.errors.RequestError: 15: Invalid Value
from huesyncbox.
There seem to be some API updates on the box.
I had already been working on some other fixes and improvements for this integration and the first one was already solved when I simplified some code. I just also fixed the second issue you mentioned.
I tagged version 1.11.0 which should be available soon. Could you check if that solves the issues?
EDIT: release is available now
from huesyncbox.
I can confirm no errors and everything works beautifully after updating to 1.11.0.
Thank you!
from huesyncbox.
Related Issues (20)
- HomeKit HOT 1
- Show which input is detecting signal in attributes HOT 9
- Can't make this integration to work HOT 3
- Error "Updating huesyncbox media_player took longer than the scheduled update interval 0:00:02" HOT 11
- Cannot Set Brightness via Script/Automation HOT 2
- This custom component will stop working in Home Assistant 2022.6 HOT 6
- ability to switch bridges HOT 3
- Entity implements device_state_attributes. Please report it to the custom component author. HOT 2
- Trouble with syncing with my actual hue sync box HOT 3
- Failed to call service media_player/media_play. 16: Invalid State HOT 1
- Duplicate entries in automation triggers/conditions/actions HOT 1
- brightness sensor HOT 2
- Integration into home assistant maintaining the hue sync app HOT 1
- Add Discussion tab HOT 1
- Setup failed for custom integration huesyncbox: Unable to import component: No module named 'aiohuesyncbox'` HOT 4
- Error connecting to the Philips Hue Play HDMI Sync Box HOT 2
- Toggle Power State HOT 8
- Hue sync box connection HOT 5
- Dolby Vision compatibility - switch request HOT 4
- Unable to register HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from huesyncbox.