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

Error after upgrade - TypeError: sequence item 1: expected str instance, NoneType found #122

Closed
StefanoGiu opened this issue May 6, 2024 · 1 comment

Comments

@StefanoGiu
Copy link

2024-05-06 17:46:37.798 ERROR (MainThread) [homeassistant.util.logging] Exception in _on_device_discovered when dispatching 'signal_hpprinter_device_discovered': ('4b2bc91ff934d06176586c0d1fdaf6fd', 'Consumable.4', {'consumable_label_code': 'Y', 'consumable_life_state_consumable_state': 'newGenuineHP', 'consumable_life_state_brand': 'unknown', 'consumable_station': '4', 'consumable_type_enum': 'inkTank', 'consumable_percentage_level_remaining': '100'}, {'device_type': 'Consumable', 'properties': {'consumable_label_code': {'path': 'ConsumableLabelCode'}, 'consumable_life_state_consumable_state': {'path': 'ConsumableLifeState.ConsumableState', 'platform': 'binary_sensor', 'on_values': ['ok', 'newGenuineHP'], 'device_class': 'plug'}, 'consumable_life_state_brand': {'path': 'ConsumableLifeState.Brand'}, 'consumable_station': {'path': 'ConsumableStation'}, 'consumable_type_enum': {'path': 'ConsumableTypeEnum', 'platform': 'sensor', 'device_class': 'enum', 'options': ['ink', 'inkCartridge', 'printhead', 'toner']}, 'installation_date': {'path': 'Installation.Date', 'platform': 'sensor', 'device_class': 'date'}, 'capacity_max_capacity': {'path': 'Capacity.MaxCapacity'}, 'consumable_percentage_level_remaining': {'path': 'ConsumablePercentageLevelRemaining', 'platform': 'sensor', 'unit_of_measurement': '%', 'exclude': {'consumable_type_enum': 'printhead'}}, 'consumable_selectibility_number': {'path': 'ConsumableSelectibilityNumber'}, 'manufacturer_name': {'path': 'Manufacturer.Name'}, 'manufacture_at': {'path': 'Manufacturer.Date', 'platform': 'sensor', 'device_class': 'date', 'exclude': {'consumable_type_enum': 'printhead'}}, 'serial_number': {'path': 'SerialNumber'}, 'product_number': {'path': 'ProductNumber'}, 'warranty_expiration_date': {'path': 'Warranty.ExpirationDate', 'platform': 'sensor', 'device_class': 'date', 'exclude': {'consumable_type_enum': 'printhead'}}, 'consumable_unique_id': {'path': 'ConsumableUniqueID'}, 'marker_color': {'path': 'MarkerColor'}, 'estimated_pages_remaining': {'path': 'EstimatedPagesRemaining', 'platform': 'sensor', 'unit_of_measurement': 'pages', 'exclude': {'consumable_type_enum': 'printhead'}}, 'consumable_state': {'path': 'ConsumableState'}, 'consumable_raw_percentage_level_remaining': {'path': 'ConsumableRawPercentageLevelRemaining'}, 'supply_serial_number': {'path': 'SupplySerialNumber.#text'}, 'refilled_count_counterfeit_refilled_count': {'path': 'RefilledCount.CounterfeitRefilledCount.#text', 'platform': 'sensor', 'unit_of_measurement': 'refills', 'icon': 'mdi:format-color-fill'}, 'refilled_count_genuine_refilled_count': {'path': 'RefilledCount.GenuineRefilledCount', 'platform': 'sensor', 'unit_of_measurement': 'refills', 'icon': 'mdi:format-color-fill'}}})
Traceback (most recent call last):
File "XXXX.homeassistant\custom_components\hpprinter\managers\ha_coordinator.py", line 266, in _on_device_discovered
handler(device_key, device_data, device_config)
File "XXXX.homeassistant\custom_components\hpprinter\managers\ha_coordinator.py", line 165, in create_consumable_device
cartridge_device_name = " ".join(device_name_parts)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: sequence item 1: expected str instance, NoneType found

@elad-bar
Copy link
Owner

elad-bar commented May 7, 2024

dup #113

@elad-bar elad-bar closed this as completed May 7, 2024
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

2 participants