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

Unexpected error for call_service at pos 1: 'NoneType' object has no attribute 'state' #21

Closed
srvoets opened this issue Jun 2, 2021 · 0 comments

Comments

@srvoets
Copy link

srvoets commented Jun 2, 2021

Just got my pool pump switch working and I wanted to use this to automate it, am getting the following when I call the service from dev tools

`This error originated from a custom integration.

Logger: homeassistant.helpers.script.websocket_api_script
Source: custom_components/pool_pump/init.py:97
Integration: Pool Pump Manager (documentation)
First occurred: 1:34:21 AM (1 occurrences)
Last logged: 1:34:21 AM

websocket_api script: Error executing script. Unexpected error for call_service at pos 1: 'NoneType' object has no attribute 'state'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 366, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 566, in _async_call_service_step
await service_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1481, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1516, in _execute_service
await handler.job.target(service_call)
File "/config/custom_components/pool_pump/init.py", line 97, in check
_LOGGER.debug("Pool pump mode: %s", mode.state)
AttributeError: 'NoneType' object has no attribute 'state'
`

@srvoets srvoets closed this as completed Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant