gcobb321 / icloud3_v3

iCloud3 v3, Development Version - This Repo/Version is used for development and testing of new and updated features. It is not the official release of iCloud3 v3, .
MIT License
169 stars 13 forks source link

Error in HA-Log: 'NoneType' object has no attribute 'lower' #189

Closed GerdRuetten closed 1 year ago

GerdRuetten commented 1 year ago

Dear Gary,

i see in my HA-Log many errors like the following:

Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/icloud3/support/service_handler.py:114
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 20:24:09 (142 occurrences)
Last logged: 21:34:09

[140429702700736] 'NoneType' object has no attribute 'lower'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 226, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1974, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2018, in _execute_service
    return await self._hass.async_add_executor_job(target, service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/icloud3/support/service_handler.py", line 114, in process_update_service_request
    action       = call.data.get('command').lower() or call.data.get('action').lower()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'lower'

My iCloud3 version is: Prerelease Version - v3.0-pr1.3 (8/24/2023)

My HA version is: Home Assistant 2023.8.4 Supervisor 2023.08.1 Operating System 10.5 Frontend 20230802.1 - latest

Tell me, if you need more information.

Best regards

Gerd

gcobb321 commented 1 year ago

An easy fix and I have what I need. I’ll fix it in pr1.4. Thanks