Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hubitat.send_command only working on devices attached to most recently reloaded hub in HA #215

Closed
glocklol opened this issue Jun 1, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@glocklol
Copy link

glocklol commented Jun 1, 2023

Multiple Hubs, both running makerapi. Both hubs added to HA. While devices and entities work as they should for the most part, upon calling the service 'hubitat.send_command' against an entity on the not-most-recently-reloaded hub, the following error is thrown:

Logger: homeassistant.helpers.script.websocket_api_script
Source: custom_components/hubitat/services.py:73
Integration: Hubitat (documentation, issues)
First occurred: 10:38:32 PM (10 occurrences)
Last logged: 11:34:32 PM

websocket_api script: Error executing script. Unexpected error for call_service at pos 1: Invalid or unknown entity 'switch.garage_siren'
websocket_api script: Error executing script. Unexpected error for call_service at pos 1: Invalid or unknown entity 'switch.garage_siren_alarm'
websocket_api script: Error executing script. Unexpected error for call_service at pos 1: Invalid or unknown entity 'light.yard_light_on_garagehub'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 452, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 685, in _async_call_service_step
await service_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1849, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1889, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/config/custom_components/hubitat/services.py", line 81, in send_command
entity = get_entity(service)
File "/config/custom_components/hubitat/services.py", line 73, in get_entity
raise ValueError(f"Invalid or unknown entity '{entity_id}'")
ValueError: Invalid or unknown entity 'switch.garage_siren'

@jason0x43 jason0x43 added the bug Something isn't working label Jun 11, 2023
@jason0x43
Copy link
Owner

This is fixed in v0.9.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants