Closed
Description
Cartridges cannot be setup in version 2.0.0b5
Printer: HP Officejet 5740 e-All-in-One Printer series
Home Assistant: 2024.5.0
Logger: homeassistant.util.logging
Source: util/logging.py:98
First occurred: 18:16:55 (12 occurrences)
Last logged: 19:51:34
Exception in _on_device_discovered when dispatching 'signal_hpprinter_device_discovered': ('76206a04580ac4f3cbd6f3608a971357', 'Consumable.1', {'consumable_label_code': 'K', 'consumable_life_state_consumable_state': 'newGenuineHP', 'consumable_life_state_brand': 'HP', 'consumable_station': '1', 'consumable_type_enum': 'inkCartridge', 'capacity_max_capacity': '0', 'consumable_percentage_level_remaining': '80', 'consumable_selectibility_number': '62', 'consumable_unique_id': '000000000000004be5399cf9de96914f'}, {'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', 'platform': 'sensor'}, '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'}}}) Traceback (most recent call last): File "/config/custom_components/hpprinter/managers/ha_coordinator.py", line 266, in _on_device_discovered handler(device_key, device_data, device_config) File "/config/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
Exception in _on_device_discovered when dispatching 'signal_hpprinter_device_discovered': ('76206a04580ac4f3cbd6f3608a971357', 'Consumable.None', {'marker_color': 'Black', 'consumable_raw_percentage_level_remaining': '84', 'refilled_count_counterfeit_refilled_count': '0', 'refilled_count_genuine_refilled_count': '0'}, {'device_type': 'Consumable', 'properties': {'consumable_station': {'path': 'ConsumableStation'}, '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 "/config/custom_components/hpprinter/managers/ha_coordinator.py", line 266, in _on_device_discovered handler(device_key, device_data, device_config) File "/config/custom_components/hpprinter/managers/ha_coordinator.py", line 161, in create_consumable_device device_name_parts.append(cartridge_type.capitalize()) ^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'capitalize'
Exception in _on_device_discovered when dispatching 'signal_hpprinter_device_discovered': ('3b39aa175df9d32f91206d5458e6bbcc', 'Consumable.0', {'consumable_label_code': 'CMY', 'consumable_life_state_consumable_state': 'newGenuineHP', 'consumable_life_state_brand': 'HP', 'consumable_station': '0', 'consumable_type_enum': 'inkCartridge', 'capacity_max_capacity': '0', 'consumable_percentage_level_remaining': '70', 'consumable_selectibility_number': '62', 'consumable_unique_id': '00000000000000c8b2c6e9e7c3991132'}, {'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', 'platform': 'sensor'}, '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'}}}) Traceback (most recent call last): File "/config/custom_components/hpprinter/managers/ha_coordinator.py", line 266, in _on_device_discovered handler(device_key, device_data, device_config) File "/config/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
Exception in _on_device_discovered when dispatching 'signal_hpprinter_device_discovered': ('3b39aa175df9d32f91206d5458e6bbcc', 'Consumable.1', {'consumable_label_code': 'K', 'consumable_life_state_consumable_state': 'newGenuineHP', 'consumable_life_state_brand': 'HP', 'consumable_station': '1', 'consumable_type_enum': 'inkCartridge', 'capacity_max_capacity': '0', 'consumable_percentage_level_remaining': '80', 'consumable_selectibility_number': '62', 'consumable_unique_id': '000000000000004be5399cf9de96914f'}, {'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', 'platform': 'sensor'}, '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'}}}) Traceback (most recent call last): File "/config/custom_components/hpprinter/managers/ha_coordinator.py", line 266, in _on_device_discovered handler(device_key, device_data, device_config) File "/config/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
Exception in _on_device_discovered when dispatching 'signal_hpprinter_device_discovered': ('3b39aa175df9d32f91206d5458e6bbcc', 'Consumable.None', {'marker_color': 'Black', 'consumable_raw_percentage_level_remaining': '84', 'refilled_count_counterfeit_refilled_count': '0', 'refilled_count_genuine_refilled_count': '0'}, {'device_type': 'Consumable', 'properties': {'consumable_station': {'path': 'ConsumableStation'}, '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 "/config/custom_components/hpprinter/managers/ha_coordinator.py", line 266, in _on_device_discovered handler(device_key, device_data, device_config) File "/config/custom_components/hpprinter/managers/ha_coordinator.py", line 161, in create_consumable_device device_name_parts.append(cartridge_type.capitalize()) ^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'capitalize'
Here is the XML contents for the Consumables
consumables_xml_output.zip
Metadata
Metadata
Assignees
Labels
No labels