Skip to content

markers don't seem to work if there is a single marker #410

@agoode

Description

@agoode

I have a "Brother HL-L2370DW series" printer. This library (used by home assistant) doesn't see the toner level from the printer.

When I run the sample code, I get this output:

Printer(info=Info(name='Brother HL-L2370DW series', 
printer_name='Secret', 
printer_uri_supported=['ipp://secret.local/ipp/print', 'ipps://secret.local:443/ipp/print'], 
uptime=2272798, 
command_set='PJL,PCL,PCLXL,URF', 
location='Guest Room', 
manufacturer='Brother', 
model='HL-L2370DW series', 
printer_info='Secret', 
serial=None, 
uuid=None, 
version=['1.72', '3.04'], 
more_info='http://secret.local/net/net/airprint.html'), 
markers=[], 
state=State(printer_state='idle', reasons=None, message=None), 
uris=[Uri(uri='ipp://secret.local/ipp/print', authentication=None, security=None), Uri(uri='ipps://secret.local:443/ipp/print', authentication=None, security=None)])

Using ipptool, these are the marker values:

        marker-colors (nameWithoutLanguage) = #000000
        marker-high-levels (integer) = 100
        marker-levels (integer) = 70
        marker-low-levels (integer) = 9
        marker-names (nameWithoutLanguage) = BK
        marker-types (keyword) = toner

I believe that the library is looking for a list and not working for a single-marker configuration. I would expect to see the markers list populated in the output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions