home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.11k stars 29.79k forks source link

AttributeError: 'list' object has no attribute 'split' #49877

Closed hmmbob closed 3 years ago

hmmbob commented 3 years ago

The problem

HA 2021.5.0b1 throws this indescribtive error in the logs, and I really do not have an idea where it is coming from

AttributeError: 'list' object has no attribute 'split'

What is version of Home Assistant Core has the issue?

core-2021.5.0b1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Google Assistant

Link to integration documentation on our website

https://www.home-assistant.io/integrations/google_assistant/

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.core
Source: core.py:117
First occurred: 18:07:07 (8 occurrences)
Last logged: 21:22:02

Error in event filter
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 717, in async_fire
    if not event_filter(event):
  File "/usr/src/homeassistant/homeassistant/components/recorder/__init__.py", line 367, in _async_event_filter
    return bool(entity_id is None or self.entity_filter(entity_id))
  File "/usr/src/homeassistant/homeassistant/helpers/entityfilter.py", line 169, in entity_filter_2
    domain = split_entity_id(entity_id)[0]
  File "/usr/src/homeassistant/homeassistant/core.py", line 117, in split_entity_id
    return entity_id.split(".", 1)
AttributeError: 'list' object has no attribute 'split'

Additional information

No response

hmmbob commented 3 years ago

Magically disappeared in b3

hmmbob commented 3 years ago

Nope, still there

Mariusthvdb commented 3 years ago

on b4 now, and have yet to see these errors appear, though only on for about an hour, and its still weekend mode, so no real production effects in the home ;-)

hmmbob commented 3 years ago

On Discord, it was suggested to compare custom components. I only have 4:

Mariusthvdb commented 3 years ago
Schermafbeelding_2021-05-01_om_10 31 08
hmmbob commented 3 years ago

Happened again, but due to the patch by @frenck we now have more details:

2021-05-01 18:04:10 ERROR (MainThread) [homeassistant.core] Error in event filter
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/core.py", line 118, in split_entity_id
return entity_id.split(".", 1)
AttributeError: 'list' object has no attribute 'split'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/core.py", line 719, in async_fire
if not event_filter(event):
File "/usr/src/homeassistant/homeassistant/components/recorder/__init__.py", line 367, in _async_event_filter
return bool(entity_id is None or self.entity_filter(entity_id))
File "/usr/src/homeassistant/homeassistant/helpers/entityfilter.py", line 169, in entity_filter_2
domain = split_entity_id(entity_id)[0]
File "/usr/src/homeassistant/homeassistant/core.py", line 120, in split_entity_id
raise HomeAssistantError("Unexpected entity ID format", entity_id) from err
homeassistant.exceptions.HomeAssistantError: ('Unexpected entity ID format', ['switch.grijze_lamp', 'light.window_level', 'switch.staande_lamp', 'switch.zoutlamp', 'climate.woonkamer'])

In that last line ('Unexpected entity ID format', ['switch.grijze_lamp', 'light.window_level', 'switch.staande_lamp', 'switch.zoutlamp', 'climate.woonkamer']), there are 4 different integrations involved:

But what they do have in common, is that all these devices are in the same area "woonkamer". I do have google_assistant setup, one of the integrations that use rooms. I do not have any automation targeting an area (I always target entities). Fun fact: a lot more devices in the same area are missing? 🤷🏻

edit: my gut feeling says google_assistant, yet a sync devices does not trigger the error. it did, I just didn't hit the refresh button in the logs 🤦🏻

mib1185 commented 3 years ago

Maybe an stupid idea, but are these entities grouped? :thinking:

hmmbob commented 3 years ago

Nice! All of them are in the same group, with the exception of climate.woonkamer.

# groups.yaml
lampen_woonkamer:
  name: Verlichting Woonkamer
  icon: mdi:lightbulb-group-outline
  entities:
    - switch.grijze_lamp
    - switch.staande_lamp
    - switch.zoutlamp
    - light.window_level

climate.woonkamer isn't part of any group.

mib1185 commented 3 years ago

is there an automation or service call which make use of this group?

hmmbob commented 3 years ago

Yes. some as condition, some as target, but none of them have climate.woonkamer involved too.

https://github.com/hmmbob/HomeAssistantConfig/search?q=lampen_woonkamer

hmmbob commented 3 years ago

Just had another occurence, but with a way bigger list:

2021-05-01 19:21:57 ERROR (MainThread) [homeassistant.core] Error in event filter
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/core.py", line 118, in split_entity_id
return entity_id.split(".", 1)
AttributeError: 'list' object has no attribute 'split'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/core.py", line 719, in async_fire
if not event_filter(event):
File "/usr/src/homeassistant/homeassistant/components/recorder/__init__.py", line 367, in _async_event_filter
return bool(entity_id is None or self.entity_filter(entity_id))
File "/usr/src/homeassistant/homeassistant/helpers/entityfilter.py", line 169, in entity_filter_2
domain = split_entity_id(entity_id)[0]
File "/usr/src/homeassistant/homeassistant/core.py", line 120, in split_entity_id
raise HomeAssistantError("Unexpected entity ID format", entity_id) from err
homeassistant.exceptions.HomeAssistantError: ('Unexpected entity ID format', ['light.eetkamer_level', 'light.gang_dimmer_level', 'light.window_level', 'switch.aquarium', 'light.eetkamer_level', 'light.gang_dimmer_level', 'switch.genie', 'switch.grijze_lamp', 'light.window_level', 'switch.schuur_1', 'switch.staande_lamp', 'switch.zoutlamp'])

It is not bound to a single area, we now have entities in three different areas involved.

edit: it is 100% google_assistant, I can reproduce by yelling sync my devices to my phone:

2021-05-01 19:39:04 ERROR (MainThread) [homeassistant.core] Error in event filter
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/core.py", line 118, in split_entity_id
return entity_id.split(".", 1)
AttributeError: 'list' object has no attribute 'split'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/core.py", line 719, in async_fire
if not event_filter(event):
File "/usr/src/homeassistant/homeassistant/components/recorder/__init__.py", line 367, in _async_event_filter
return bool(entity_id is None or self.entity_filter(entity_id))
File "/usr/src/homeassistant/homeassistant/helpers/entityfilter.py", line 169, in entity_filter_2
domain = split_entity_id(entity_id)[0]
File "/usr/src/homeassistant/homeassistant/core.py", line 120, in split_entity_id
raise HomeAssistantError("Unexpected entity ID format", entity_id) from err
homeassistant.exceptions.HomeAssistantError: ('Unexpected entity ID format', ['light.eetkamer_level', 'light.gang_dimmer_level', 'light.window_level', 'switch.aquarium', 'light.eetkamer_level', 'light.gang_dimmer_level', 'switch.genie', 'switch.grijze_lamp', 'light.window_level', 'switch.schuur_1', 'switch.staande_lamp', 'switch.zoutlamp'])

Funny thing: if I try to sync from within HA the error does not pop up. So it is only if "the cloud is requesting a sync", not if HA is requesting the sync.

probot-home-assistant[bot] commented 3 years ago

google_assistant documentation google_assistant source (message by IssueLinks)

probot-home-assistant[bot] commented 3 years ago

recorder documentation recorder source (message by IssueLinks)

mib1185 commented 3 years ago

When SYNC request is received, an event is fireed https://github.com/home-assistant/core/blob/2440f25aaf7863a83b266a5b728a062498a354b4/homeassistant/components/google_assistant/smart_home.py#L79-L83

recorder listens to that by https://github.com/home-assistant/core/blob/2440f25aaf7863a83b266a5b728a062498a354b4/homeassistant/components/recorder/__init__.py#L327-L329

hmmbob commented 3 years ago

Nice tracing. I'd say that google_assistant is passing something into that event in the wrong format.

mib1185 commented 3 years ago

Please enable debug logging for google_assistant and start listening to google_assistant_sync events via Development tools -> Events from UI.

hmmbob commented 3 years ago

Nothing weird to see, if you ask me (yet still reproducable by yelling sync my devices to my phone)

2021-05-01 20:16:06 DEBUG (MainThread) [homeassistant.components.google_assistant.smart_home] Syncing entities response: {'agentUserId': '510b1afef60640d7a220711c50bxxxxx', 'devices': [{'id': 'scene.etenstijd', 'name': {'name': 'Diner'}, 'attributes': {}, 'traits': ['action.devices.traits.Scene'], 'willReportState': True, 'type': 'action.devices.types.SCENE', 'roomHint': 'Eetkamer'}, {'id': 'scene.avond', 'name': {'name': 'Avond'}, 'attributes': {}, 'traits': ['action.devices.traits.Scene'], 'willReportState': True, 'type': 'action.devices.types.SCENE', 'roomHint': 'Woonkamer'}, {'id': 'climate.woonkamer', 'name': {'name': 'Toon'}, 'attributes': {'thermostatTemperatureUnit': 'C', 'availableThermostatModes': ['heat', 'auto', 'eco']}, 'traits': ['action.devices.traits.TemperatureSetting'], 'willReportState': True, 'type': 'action.devices.types.THERMOSTAT', 'roomHint': 'Woonkamer'}, {'id': 'script.start_music_t', 'name': {'name': 'Slaaptijd'}, 'attributes': {}, 'traits': ['action.devices.traits.Scene'], 'willReportState': True, 'type': 'action.devices.types.SCENE', 'roomHint': 'Slaapkamer T'}, {'id': 'script.radio_538', 'name': {'name': 'Radio 538'}, 'attributes': {}, 'traits': ['action.devices.traits.Scene'], 'willReportState': True, 'type': 'action.devices.types.SCENE', 'roomHint': 'Woonkamer'}, {'id': 'script.qmusic', 'name': {'name': 'Radio Q'}, 'attributes': {}, 'traits': ['action.devices.traits.Scene'], 'willReportState': True, 'type': 'action.devices.types.SCENE', 'roomHint': 'Woonkamer'}, {'id': 'switch.staande_lamp', 'name': {'name': 'Staande lamp'}, 'attributes': {}, 'traits': ['action.devices.traits.OnOff'], 'willReportState': True, 'type': 'action.devices.types.SWITCH', 'roomHint': 'Woonkamer', 'deviceInfo': {'manufacturer': 'espressif', 'model': 'PLATFORMIO_ESP01_1M', 'swVersion': '1.17.0-dev (Mar 8 2021, 17:23:52)'}}, {'id': 'binary_sensor.door_sensor_2_contact', 'name': {'name': 'Voordeur'}, 'attributes': {'queryOnlyOpenClose': True, 'discreteOnlyOpenClose': True}, 'traits': ['action.devices.traits.OpenClose'], 'willReportState': True, 'type': 'action.devices.types.DOOR', 'roomHint': 'Gang', 'deviceInfo': {'manufacturer': 'Xiaomi', 'model': 'MiJia door & window contact sensor (MCCGQ01LM)', 'swVersion': 'Zigbee2MQTT 1.18.2'}}, {'id': 'switch.genie', 'name': {'name': 'Genie'}, 'attributes': {}, 'traits': ['action.devices.traits.OnOff'], 'willReportState': True, 'type': 'action.devices.types.SWITCH', 'roomHint': 'Woonkamer', 'deviceInfo': {'manufacturer': 'Rituals Cosmetics', 'model': 'The Perfume Genie 2.0', 'swVersion': '5.0'}}, {'id': 'switch.aquarium', 'name': {'name': 'Aquarium'}, 'attributes': {}, 'traits': ['action.devices.traits.OnOff'], 'willReportState': True, 'type': 'action.devices.types.SWITCH', 'roomHint': 'Woonkamer', 'deviceInfo': {'manufacturer': 'espressif', 'model': 'PLATFORMIO_ESP01_1M', 'swVersion': '1.18.0-dev (Apr 26 2021, 14:27:23)'}}, {'id': 'switch.zoutlamp', 'name': {'name': 'Zout Lamp', 'nicknames': ['Zout Lamp', 'Steen Lamp', 'Zaklamp']}, 'attributes': {}, 'traits': ['action.devices.traits.OnOff'], 'willReportState': True, 'type': 'action.devices.types.SWITCH', 'roomHint': 'Woonkamer', 'deviceInfo': {'manufacturer': 'espressif', 'model': 'PLATFORMIO_ESP01_1M', 'swVersion': '1.16.2 (Mar 8 2021, 14:24:39)'}}, {'id': 'light.eetkamer_level', 'name': {'name': 'Eetkamer'}, 'attributes': {}, 'traits': ['action.devices.traits.Brightness', 'action.devices.traits.OnOff'], 'willReportState': True, 'type': 'action.devices.types.LIGHT', 'roomHint': 'Eetkamer', 'deviceInfo': {'manufacturer': 'Qubino', 'model': 'ZMNHDD', 'swVersion': '3.5'}}, {'id': 'light.window_level', 'name': {'name': 'Raam lamp'}, 'attributes': {}, 'traits': ['action.devices.traits.Brightness', 'action.devices.traits.OnOff'], 'willReportState': True, 'type': 'action.devices.types.LIGHT', 'roomHint': 'Woonkamer', 'deviceInfo': {'manufacturer': 'Qubino', 'model': 'ZMNHDD', 'swVersion': '3.7'}}, {'id': 'light.gang_dimmer_level', 'name': {'name': 'Gang'}, 'attributes': {}, 'traits': ['action.devices.traits.Brightness', 'action.devices.traits.OnOff'], 'willReportState': True, 'type': 'action.devices.types.LIGHT', 'roomHint': 'Gang', 'deviceInfo': {'manufacturer': 'Qubino', 'model': 'ZMNHDD', 'swVersion': '3.7'}}, {'id': 'switch.schuur_1', 'name': {'name': 'Schuur'}, 'attributes': {}, 'traits': ['action.devices.traits.OnOff'], 'willReportState': True, 'type': 'action.devices.types.SWITCH', 'roomHint': 'Tuin', 'deviceInfo': {'manufacturer': 'Qubino', 'model': 'ZMNHBD', 'swVersion': '5.0'}}, {'id': 'cover.zolder', 'name': {'name': 'Zolder', 'nicknames': ['Zolder', 'Rolluik']}, 'attributes': {}, 'traits': ['action.devices.traits.StartStop', 'action.devices.traits.OpenClose'], 'willReportState': True, 'type': 'action.devices.types.BLINDS', 'roomHint': 'Zolder', 'deviceInfo': {'manufacturer': 'Qubino', 'model': 'ZMNHCD', 'swVersion': '1.1'}}, {'id': 'binary_sensor.door_sensor_1_contact', 'name': {'name': 'Vriezer'}, 'attributes': {'queryOnlyOpenClose': True, 'discreteOnlyOpenClose': True}, 'traits': ['action.devices.traits.OpenClose'], 'willReportState': True, 'type': 'action.devices.types.DOOR', 'roomHint': 'Zolder', 'deviceInfo': {'manufacturer': 'Xiaomi', 'model': 'MiJia door & window contact sensor (MCCGQ01LM)', 'swVersion': 'Zigbee2MQTT 1.18.2'}}, {'id': 'sensor.slaapkamer_temperature', 'name': {'name': 'Temperatuur slaapkamer'}, 'attributes': {'temperatureUnitForUX': 'C', 'queryOnlyTemperatureSetting': True, 'temperatureRange': {'minThresholdCelsius': -100, 'maxThresholdCelsius': 100}}, 'traits': ['action.devices.traits.TemperatureControl'], 'willReportState': True, 'type': 'action.devices.types.SENSOR', 'roomHint': 'Slaapkamer', 'deviceInfo': {'manufacturer': 'Xiaomi', 'model': 'MiJia temperature & humidity sensor (WSDCGQ01LM)', 'swVersion': 'Zigbee2MQTT 1.18.2'}}, {'id': 'sensor.zolder_temperature', 'name': {'name': 'Temperatuur zolder'}, 'attributes': {'temperatureUnitForUX': 'C', 'queryOnlyTemperatureSetting': True, 'temperatureRange': {'minThresholdCelsius': -100, 'maxThresholdCelsius': 100}}, 'traits': ['action.devices.traits.TemperatureControl'], 'willReportState': True, 'type': 'action.devices.types.SENSOR', 'roomHint': 'Zolder', 'deviceInfo': {'manufacturer': 'Xiaomi', 'model': 'MiJia temperature & humidity sensor (WSDCGQ01LM)', 'swVersion': 'Zigbee2MQTT 1.18.2'}}, {'id': 'switch.grijze_lamp', 'name': {'name': 'Grijze lamp'}, 'attributes': {}, 'traits': ['action.devices.traits.OnOff'], 'willReportState': True, 'type': 'action.devices.types.SWITCH', 'roomHint': 'Woonkamer', 'deviceInfo': {'manufacturer': 'TuYa', 'model': '10A UK or 16A EU smart plug (TS0121_plug)', 'swVersion': 'Zigbee2MQTT 1.18.2'}}]}
2021-05-01 20:16:08 ERROR (MainThread) [homeassistant.core] Error in event filter
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/core.py", line 118, in split_entity_id
return entity_id.split(".", 1)
AttributeError: 'list' object has no attribute 'split'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/core.py", line 719, in async_fire
if not event_filter(event):
File "/usr/src/homeassistant/homeassistant/components/recorder/__init__.py", line 367, in _async_event_filter
return bool(entity_id is None or self.entity_filter(entity_id))
File "/usr/src/homeassistant/homeassistant/helpers/entityfilter.py", line 169, in entity_filter_2
domain = split_entity_id(entity_id)[0]
File "/usr/src/homeassistant/homeassistant/core.py", line 120, in split_entity_id
raise HomeAssistantError("Unexpected entity ID format", entity_id) from err
homeassistant.exceptions.HomeAssistantError: ('Unexpected entity ID format', ['light.eetkamer_level', 'light.gang_dimmer_level', 'light.window_level', 'switch.aquarium', 'light.eetkamer_level', 'light.gang_dimmer_level', 'switch.genie', 'switch.grijze_lamp', 'light.window_level', 'switch.schuur_1', 'switch.staande_lamp', 'switch.zoutlamp'])

edit: now with debug for core enabled too:

2021-05-01 20:25:27 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event google_assistant_sync[L]: request_id=15180885078616837358, source=cloud>
2021-05-01 20:25:27 DEBUG (MainThread) [homeassistant.components.google_assistant.smart_home] Syncing entities response: {'agentUserId': '510b1afef60640d7a220711c50bxxxxx', 'devices': [{'id': 'scene.etenstijd', 'name': {'name': 'Diner'}, 'attributes': {}, 'traits': ['action.devices.traits.Scene'], 'willReportState': True, 'type': 'action.devices.types.SCENE', 'roomHint': 'Eetkamer'}, {'id': 'scene.avond', 'name': {'name': 'Avond'}, 'attributes': {}, 'traits': ['action.devices.traits.Scene'], 'willReportState': True, 'type': 'action.devices.types.SCENE', 'roomHint': 'Woonkamer'}, {'id': 'climate.woonkamer', 'name': {'name': 'Toon'}, 'attributes': {'thermostatTemperatureUnit': 'C', 'availableThermostatModes': ['heat', 'auto', 'eco']}, 'traits': ['action.devices.traits.TemperatureSetting'], 'willReportState': True, 'type': 'action.devices.types.THERMOSTAT', 'roomHint': 'Woonkamer'}, {'id': 'script.start_music_t', 'name': {'name': 'Slaaptijd'}, 'attributes': {}, 'traits': ['action.devices.traits.Scene'], 'willReportState': True, 'type': 'action.devices.types.SCENE', 'roomHint': 'Slaapkamer T'}, {'id': 'script.radio_538', 'name': {'name': 'Radio 538'}, 'attributes': {}, 'traits': ['action.devices.traits.Scene'], 'willReportState': True, 'type': 'action.devices.types.SCENE', 'roomHint': 'Woonkamer'}, {'id': 'script.qmusic', 'name': {'name': 'Radio Q'}, 'attributes': {}, 'traits': ['action.devices.traits.Scene'], 'willReportState': True, 'type': 'action.devices.types.SCENE', 'roomHint': 'Woonkamer'}, {'id': 'switch.staande_lamp', 'name': {'name': 'Staande lamp'}, 'attributes': {}, 'traits': ['action.devices.traits.OnOff'], 'willReportState': True, 'type': 'action.devices.types.SWITCH', 'roomHint': 'Woonkamer', 'deviceInfo': {'manufacturer': 'espressif', 'model': 'PLATFORMIO_ESP01_1M', 'swVersion': '1.17.0-dev (Mar 8 2021, 17:23:52)'}}, {'id': 'switch.genie', 'name': {'name': 'Genie'}, 'attributes': {}, 'traits': ['action.devices.traits.OnOff'], 'willReportState': True, 'type': 'action.devices.types.SWITCH', 'roomHint': 'Woonkamer', 'deviceInfo': {'manufacturer': 'Rituals Cosmetics', 'model': 'The Perfume Genie 2.0', 'swVersion': '5.0'}}, {'id': 'switch.zoutlamp', 'name': {'name': 'Zout Lamp', 'nicknames': ['Zout Lamp', 'Steen Lamp', 'Zaklamp']}, 'attributes': {}, 'traits': ['action.devices.traits.OnOff'], 'willReportState': True, 'type': 'action.devices.types.SWITCH', 'roomHint': 'Woonkamer', 'deviceInfo': {'manufacturer': 'espressif', 'model': 'PLATFORMIO_ESP01_1M', 'swVersion': '1.16.2 (Mar 8 2021, 14:24:39)'}}, {'id': 'switch.aquarium', 'name': {'name': 'Aquarium'}, 'attributes': {}, 'traits': ['action.devices.traits.OnOff'], 'willReportState': True, 'type': 'action.devices.types.SWITCH', 'roomHint': 'Woonkamer', 'deviceInfo': {'manufacturer': 'espressif', 'model': 'PLATFORMIO_ESP01_1M', 'swVersion': '1.18.0-dev (Apr 26 2021, 14:27:23)'}}, {'id': 'light.eetkamer_level', 'name': {'name': 'Eetkamer'}, 'attributes': {}, 'traits': ['action.devices.traits.Brightness', 'action.devices.traits.OnOff'], 'willReportState': True, 'type': 'action.devices.types.LIGHT', 'roomHint': 'Eetkamer', 'deviceInfo': {'manufacturer': 'Qubino', 'model': 'ZMNHDD', 'swVersion': '3.5'}}, {'id': 'light.window_level', 'name': {'name': 'Raam lamp'}, 'attributes': {}, 'traits': ['action.devices.traits.Brightness', 'action.devices.traits.OnOff'], 'willReportState': True, 'type': 'action.devices.types.LIGHT', 'roomHint': 'Woonkamer', 'deviceInfo': {'manufacturer': 'Qubino', 'model': 'ZMNHDD', 'swVersion': '3.7'}}, {'id': 'light.gang_dimmer_level', 'name': {'name': 'Gang'}, 'attributes': {}, 'traits': ['action.devices.traits.Brightness', 'action.devices.traits.OnOff'], 'willReportState': True, 'type': 'action.devices.types.LIGHT', 'roomHint': 'Gang', 'deviceInfo': {'manufacturer': 'Qubino', 'model': 'ZMNHDD', 'swVersion': '3.7'}}, {'id': 'switch.schuur_1', 'name': {'name': 'Schuur'}, 'attributes': {}, 'traits': ['action.devices.traits.OnOff'], 'willReportState': True, 'type': 'action.devices.types.SWITCH', 'roomHint': 'Tuin', 'deviceInfo': {'manufacturer': 'Qubino', 'model': 'ZMNHBD', 'swVersion': '5.0'}}, {'id': 'cover.zolder', 'name': {'name': 'Zolder', 'nicknames': ['Zolder', 'Rolluik']}, 'attributes': {}, 'traits': ['action.devices.traits.StartStop', 'action.devices.traits.OpenClose'], 'willReportState': True, 'type': 'action.devices.types.BLINDS', 'roomHint': 'Zolder', 'deviceInfo': {'manufacturer': 'Qubino', 'model': 'ZMNHCD', 'swVersion': '1.1'}}, {'id': 'binary_sensor.door_sensor_2_contact', 'name': {'name': 'Voordeur'}, 'attributes': {'queryOnlyOpenClose': True, 'discreteOnlyOpenClose': True}, 'traits': ['action.devices.traits.OpenClose'], 'willReportState': True, 'type': 'action.devices.types.DOOR', 'roomHint': 'Gang', 'deviceInfo': {'manufacturer': 'Xiaomi', 'model': 'MiJia door & window contact sensor (MCCGQ01LM)', 'swVersion': 'Zigbee2MQTT 1.18.2'}}, {'id': 'binary_sensor.door_sensor_1_contact', 'name': {'name': 'Vriezer'}, 'attributes': {'queryOnlyOpenClose': True, 'discreteOnlyOpenClose': True}, 'traits': ['action.devices.traits.OpenClose'], 'willReportState': True, 'type': 'action.devices.types.DOOR', 'roomHint': 'Zolder', 'deviceInfo': {'manufacturer': 'Xiaomi', 'model': 'MiJia door & window contact sensor (MCCGQ01LM)', 'swVersion': 'Zigbee2MQTT 1.18.2'}}, {'id': 'sensor.slaapkamer_temperature', 'name': {'name': 'Temperatuur slaapkamer'}, 'attributes': {'temperatureUnitForUX': 'C', 'queryOnlyTemperatureSetting': True, 'temperatureRange': {'minThresholdCelsius': -100, 'maxThresholdCelsius': 100}}, 'traits': ['action.devices.traits.TemperatureControl'], 'willReportState': True, 'type': 'action.devices.types.SENSOR', 'roomHint': 'Slaapkamer', 'deviceInfo': {'manufacturer': 'Xiaomi', 'model': 'MiJia temperature & humidity sensor (WSDCGQ01LM)', 'swVersion': 'Zigbee2MQTT 1.18.2'}}, {'id': 'sensor.zolder_temperature', 'name': {'name': 'Temperatuur zolder'}, 'attributes': {'temperatureUnitForUX': 'C', 'queryOnlyTemperatureSetting': True, 'temperatureRange': {'minThresholdCelsius': -100, 'maxThresholdCelsius': 100}}, 'traits': ['action.devices.traits.TemperatureControl'], 'willReportState': True, 'type': 'action.devices.types.SENSOR', 'roomHint': 'Zolder', 'deviceInfo': {'manufacturer': 'Xiaomi', 'model': 'MiJia temperature & humidity sensor (WSDCGQ01LM)', 'swVersion': 'Zigbee2MQTT 1.18.2'}}, {'id': 'switch.grijze_lamp', 'name': {'name': 'Grijze lamp'}, 'attributes': {}, 'traits': ['action.devices.traits.OnOff'], 'willReportState': True, 'type': 'action.devices.types.SWITCH', 'roomHint': 'Woonkamer', 'deviceInfo': {'manufacturer': 'TuYa', 'model': '10A UK or 16A EU smart plug (TS0121_plug)', 'swVersion': 'Zigbee2MQTT 1.18.2'}}]}
2021-05-01 20:25:31 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event google_assistant_query[L]: request_id=8623094454598832215, entity_id=['light.eetkamer_level', 'light.gang_dimmer_level', 'light.window_level', 'switch.aquarium', 'light.eetkamer_level', 'light.gang_dimmer_level', 'switch.genie', 'switch.grijze_lamp', 'light.window_level', 'switch.schuur_1', 'switch.staande_lamp', 'switch.zoutlamp'], source=cloud>
2021-05-01 20:25:31 ERROR (MainThread) [homeassistant.core] Error in event filter
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/core.py", line 118, in split_entity_id
return entity_id.split(".", 1)
AttributeError: 'list' object has no attribute 'split'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/core.py", line 719, in async_fire
if not event_filter(event):
File "/usr/src/homeassistant/homeassistant/components/recorder/__init__.py", line 367, in _async_event_filter
return bool(entity_id is None or self.entity_filter(entity_id))
File "/usr/src/homeassistant/homeassistant/helpers/entityfilter.py", line 169, in entity_filter_2
domain = split_entity_id(entity_id)[0]
File "/usr/src/homeassistant/homeassistant/core.py", line 120, in split_entity_id
raise HomeAssistantError("Unexpected entity ID format", entity_id) from err
homeassistant.exceptions.HomeAssistantError: ('Unexpected entity ID format', ['light.eetkamer_level', 'light.gang_dimmer_level', 'light.window_level', 'switch.aquarium', 'light.eetkamer_level', 'light.gang_dimmer_level', 'switch.genie', 'switch.grijze_lamp', 'light.window_level', 'switch.schuur_1', 'switch.staande_lamp', 'switch.zoutlamp'])

listening to the sync event gave:

Gebeurtenis 0 uitgevoerd 20:29:
{
    "event_type": "google_assistant_sync",
    "data": {
        "request_id": "11797717413694808904",
        "source": "cloud"
    },
    "origin": "LOCAL",
    "time_fired": "2021-05-01T18:29:42.547655+00:00",
    "context": {
        "id": "89eaf8cc3ab8e3444e923b62437a6b15",
        "parent_id": null,
        "user_id": "510b1afef60640d7a220711c50b2192a"
    }
}

Associated errors/debug in the logs:

2021-05-01 20:29:42 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event google_assistant_sync[L]: request_id=11797717413694808904, source=cloud>
2021-05-01 20:29:42 DEBUG (MainThread) [homeassistant.components.google_assistant.smart_home] Syncing entities response: {'agentUserId': '510b1afef60640d7a220711c50bxxxxx', 'devices': [{'id': 'scene.etenstijd', 'name': {'name': 'Diner'}, 'attributes': {}, 'traits': ['action.devices.traits.Scene'], 'willReportState': True, 'type': 'action.devices.types.SCENE', 'roomHint': 'Eetkamer'}, {'id': 'scene.avond', 'name': {'name': 'Avond'}, 'attributes': {}, 'traits': ['action.devices.traits.Scene'], 'willReportState': True, 'type': 'action.devices.types.SCENE', 'roomHint': 'Woonkamer'}, {'id': 'climate.woonkamer', 'name': {'name': 'Toon'}, 'attributes': {'thermostatTemperatureUnit': 'C', 'availableThermostatModes': ['heat', 'auto', 'eco']}, 'traits': ['action.devices.traits.TemperatureSetting'], 'willReportState': True, 'type': 'action.devices.types.THERMOSTAT', 'roomHint': 'Woonkamer'}, {'id': 'script.start_music_t', 'name': {'name': 'Slaaptijd'}, 'attributes': {}, 'traits': ['action.devices.traits.Scene'], 'willReportState': True, 'type': 'action.devices.types.SCENE', 'roomHint': 'Slaapkamer T'}, {'id': 'script.radio_538', 'name': {'name': 'Radio 538'}, 'attributes': {}, 'traits': ['action.devices.traits.Scene'], 'willReportState': True, 'type': 'action.devices.types.SCENE', 'roomHint': 'Woonkamer'}, {'id': 'script.qmusic', 'name': {'name': 'Radio Q'}, 'attributes': {}, 'traits': ['action.devices.traits.Scene'], 'willReportState': True, 'type': 'action.devices.types.SCENE', 'roomHint': 'Woonkamer'}, {'id': 'switch.staande_lamp', 'name': {'name': 'Staande lamp'}, 'attributes': {}, 'traits': ['action.devices.traits.OnOff'], 'willReportState': True, 'type': 'action.devices.types.SWITCH', 'roomHint': 'Woonkamer', 'deviceInfo': {'manufacturer': 'espressif', 'model': 'PLATFORMIO_ESP01_1M', 'swVersion': '1.17.0-dev (Mar 8 2021, 17:23:52)'}}, {'id': 'switch.genie', 'name': {'name': 'Genie'}, 'attributes': {}, 'traits': ['action.devices.traits.OnOff'], 'willReportState': True, 'type': 'action.devices.types.SWITCH', 'roomHint': 'Woonkamer', 'deviceInfo': {'manufacturer': 'Rituals Cosmetics', 'model': 'The Perfume Genie 2.0', 'swVersion': '5.0'}}, {'id': 'switch.zoutlamp', 'name': {'name': 'Zout Lamp', 'nicknames': ['Zout Lamp', 'Steen Lamp', 'Zaklamp']}, 'attributes': {}, 'traits': ['action.devices.traits.OnOff'], 'willReportState': True, 'type': 'action.devices.types.SWITCH', 'roomHint': 'Woonkamer', 'deviceInfo': {'manufacturer': 'espressif', 'model': 'PLATFORMIO_ESP01_1M', 'swVersion': '1.16.2 (Mar 8 2021, 14:24:39)'}}, {'id': 'switch.aquarium', 'name': {'name': 'Aquarium'}, 'attributes': {}, 'traits': ['action.devices.traits.OnOff'], 'willReportState': True, 'type': 'action.devices.types.SWITCH', 'roomHint': 'Woonkamer', 'deviceInfo': {'manufacturer': 'espressif', 'model': 'PLATFORMIO_ESP01_1M', 'swVersion': '1.18.0-dev (Apr 26 2021, 14:27:23)'}}, {'id': 'light.eetkamer_level', 'name': {'name': 'Eetkamer'}, 'attributes': {}, 'traits': ['action.devices.traits.Brightness', 'action.devices.traits.OnOff'], 'willReportState': True, 'type': 'action.devices.types.LIGHT', 'roomHint': 'Eetkamer', 'deviceInfo': {'manufacturer': 'Qubino', 'model': 'ZMNHDD', 'swVersion': '3.5'}}, {'id': 'light.window_level', 'name': {'name': 'Raam lamp'}, 'attributes': {}, 'traits': ['action.devices.traits.Brightness', 'action.devices.traits.OnOff'], 'willReportState': True, 'type': 'action.devices.types.LIGHT', 'roomHint': 'Woonkamer', 'deviceInfo': {'manufacturer': 'Qubino', 'model': 'ZMNHDD', 'swVersion': '3.7'}}, {'id': 'light.gang_dimmer_level', 'name': {'name': 'Gang'}, 'attributes': {}, 'traits': ['action.devices.traits.Brightness', 'action.devices.traits.OnOff'], 'willReportState': True, 'type': 'action.devices.types.LIGHT', 'roomHint': 'Gang', 'deviceInfo': {'manufacturer': 'Qubino', 'model': 'ZMNHDD', 'swVersion': '3.7'}}, {'id': 'switch.schuur_1', 'name': {'name': 'Schuur'}, 'attributes': {}, 'traits': ['action.devices.traits.OnOff'], 'willReportState': True, 'type': 'action.devices.types.SWITCH', 'roomHint': 'Tuin', 'deviceInfo': {'manufacturer': 'Qubino', 'model': 'ZMNHBD', 'swVersion': '5.0'}}, {'id': 'cover.zolder', 'name': {'name': 'Zolder', 'nicknames': ['Zolder', 'Rolluik']}, 'attributes': {}, 'traits': ['action.devices.traits.StartStop', 'action.devices.traits.OpenClose'], 'willReportState': True, 'type': 'action.devices.types.BLINDS', 'roomHint': 'Zolder', 'deviceInfo': {'manufacturer': 'Qubino', 'model': 'ZMNHCD', 'swVersion': '1.1'}}, {'id': 'binary_sensor.door_sensor_2_contact', 'name': {'name': 'Voordeur'}, 'attributes': {'queryOnlyOpenClose': True, 'discreteOnlyOpenClose': True}, 'traits': ['action.devices.traits.OpenClose'], 'willReportState': True, 'type': 'action.devices.types.DOOR', 'roomHint': 'Gang', 'deviceInfo': {'manufacturer': 'Xiaomi', 'model': 'MiJia door & window contact sensor (MCCGQ01LM)', 'swVersion': 'Zigbee2MQTT 1.18.2'}}, {'id': 'binary_sensor.door_sensor_1_contact', 'name': {'name': 'Vriezer'}, 'attributes': {'queryOnlyOpenClose': True, 'discreteOnlyOpenClose': True}, 'traits': ['action.devices.traits.OpenClose'], 'willReportState': True, 'type': 'action.devices.types.DOOR', 'roomHint': 'Zolder', 'deviceInfo': {'manufacturer': 'Xiaomi', 'model': 'MiJia door & window contact sensor (MCCGQ01LM)', 'swVersion': 'Zigbee2MQTT 1.18.2'}}, {'id': 'sensor.slaapkamer_temperature', 'name': {'name': 'Temperatuur slaapkamer'}, 'attributes': {'temperatureUnitForUX': 'C', 'queryOnlyTemperatureSetting': True, 'temperatureRange': {'minThresholdCelsius': -100, 'maxThresholdCelsius': 100}}, 'traits': ['action.devices.traits.TemperatureControl'], 'willReportState': True, 'type': 'action.devices.types.SENSOR', 'roomHint': 'Slaapkamer', 'deviceInfo': {'manufacturer': 'Xiaomi', 'model': 'MiJia temperature & humidity sensor (WSDCGQ01LM)', 'swVersion': 'Zigbee2MQTT 1.18.2'}}, {'id': 'sensor.zolder_temperature', 'name': {'name': 'Temperatuur zolder'}, 'attributes': {'temperatureUnitForUX': 'C', 'queryOnlyTemperatureSetting': True, 'temperatureRange': {'minThresholdCelsius': -100, 'maxThresholdCelsius': 100}}, 'traits': ['action.devices.traits.TemperatureControl'], 'willReportState': True, 'type': 'action.devices.types.SENSOR', 'roomHint': 'Zolder', 'deviceInfo': {'manufacturer': 'Xiaomi', 'model': 'MiJia temperature & humidity sensor (WSDCGQ01LM)', 'swVersion': 'Zigbee2MQTT 1.18.2'}}, {'id': 'switch.grijze_lamp', 'name': {'name': 'Grijze lamp'}, 'attributes': {}, 'traits': ['action.devices.traits.OnOff'], 'willReportState': True, 'type': 'action.devices.types.SWITCH', 'roomHint': 'Woonkamer', 'deviceInfo': {'manufacturer': 'TuYa', 'model': '10A UK or 16A EU smart plug (TS0121_plug)', 'swVersion': 'Zigbee2MQTT 1.18.2'}}]}
2021-05-01 20:29:43 DEBUG (Recorder) [homeassistant.components.recorder] Sending keepalive
2021-05-01 20:29:44 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event google_assistant_query[L]: request_id=13077874452735994760, entity_id=['light.eetkamer_level', 'light.gang_dimmer_level', 'light.window_level', 'switch.aquarium', 'light.eetkamer_level', 'light.gang_dimmer_level', 'switch.genie', 'switch.grijze_lamp', 'light.window_level', 'switch.schuur_1', 'switch.staande_lamp', 'switch.zoutlamp'], source=cloud>
2021-05-01 20:29:44 ERROR (MainThread) [homeassistant.core] Error in event filter
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/core.py", line 118, in split_entity_id
return entity_id.split(".", 1)
AttributeError: 'list' object has no attribute 'split'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/core.py", line 719, in async_fire
if not event_filter(event):
File "/usr/src/homeassistant/homeassistant/components/recorder/__init__.py", line 367, in _async_event_filter
return bool(entity_id is None or self.entity_filter(entity_id))
File "/usr/src/homeassistant/homeassistant/helpers/entityfilter.py", line 169, in entity_filter_2
domain = split_entity_id(entity_id)[0]
File "/usr/src/homeassistant/homeassistant/core.py", line 120, in split_entity_id
raise HomeAssistantError("Unexpected entity ID format", entity_id) from err
homeassistant.exceptions.HomeAssistantError: ('Unexpected entity ID format', ['light.eetkamer_level', 'light.gang_dimmer_level', 'light.window_level', 'switch.aquarium', 'light.eetkamer_level', 'light.gang_dimmer_level', 'switch.genie', 'switch.grijze_lamp', 'light.window_level', 'switch.schuur_1', 'switch.staande_lamp', 'switch.zoutlamp'])
mib1185 commented 3 years ago

ok ... the issue is caused by changes from #49449 entity_id is overall assumed to be of type str, but with the change above it contains a list[str]

cc @balloob

mib1185 commented 3 years ago

some thoughts about #49449