You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My power controls though moonraker work fine. When toggling the power switch entity through HA (switch.am8_printer) the UI shows an error Failed to perform the action switch/turn off. state but the power does toggle correctly.
HA Logs
2024-09-03 19:00:29.076 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 258, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 453, in _async_refresh
self.async_update_listeners()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 168, in async_update_listeners
update_callback()
File "/config/custom_components/moonraker/sensor.py", line 796, in _handle_coordinator_update
self._attr_native_value = self.entity_description.value_fn(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/moonraker/sensor.py", line 46, in <lambda>
value_fn=lambda sensor: sensor.coordinator.data["printer.info"]["state"],
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: 'state'
2024-09-03 19:00:35.086 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 462, in _handle_request
resp = await request_handler(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 537, in _handle
resp = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 210, in forwarded_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 85, in ban_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware
response = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle
result = await handler(request, **request.match_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 813, in get
return await self.handle(request, camera)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 831, in handle
image = await _async_get_image(
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 185, in _async_get_image
else await camera.async_camera_image(width=width, height=height)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/moonraker/camera.py", line 162, in async_camera_image
self.coordinator.data["status"]["print_stats"]["state"]
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
KeyError: 'status'
Also noticed that the state gets out of sync. Eg, the state of the switch entity in HA is "on" but its actually powered off (which is correctly shown in mainsail)
I have this same issue with the latest updates on my relay connected to the GPIO on the pi to control power to the printer board and an LED light strip.
Version of the moonraker integration
1.3.4
Describe your setup
Klipper, Moonraker, Mainsail, Raspi.
Relay connected to the GPIO on the pi to control power to the printer board (SKR mini)
Describe the bug
My power controls though moonraker work fine. When toggling the power switch entity through HA (
switch.am8_printer
) the UI shows an errorFailed to perform the action switch/turn off. state
but the power does toggle correctly.HA Logs
The corresponding error from
moonraker.log
...Klippy being disconnected is expected if the printer is off. Any suggestions?
The text was updated successfully, but these errors were encountered: