Phil406
(KAT)
September 24, 2022, 10:49am
21
Here below my lovelace code.
To get this result I’m using “Mushroom theme” and for the level indicator I’m using “Bar-card”, both are downloadable from HACS in the Frontend section. If you have questions please be free to post them here, I hope this will inspire more people to create beautyful views
type: vertical-stack
cards:
- type: horizontal-stack
cards:
- type: custom:mushroom-title-card
title: Xerox Workcentre 6515 dni
subtitle: 'Pages Count: {{ states(''sensor.page_count'') }} '
- type: horizontal-stack
cards:
- type: picture
image: /local/images/xerox_workcentre_6515-1.png
tap_action:
action: none
hold_action:
action: none
- type: horizontal-stack
cards:
- type: custom:mushroom-template-card
primary: Available
secondary: '{{ states(''sensor.prncyanlvl'') }} / {{ states(''sensor.prncyancap'') }}'
icon: mdi:image-filter-none
layout: vertical
icon_color: cyan
- type: custom:mushroom-template-card
primary: Available
secondary: >-
{{ states('sensor.prnmagentalvl') }} / {{
states('sensor.prnmagentacap') }}
icon: mdi:image-filter-none
layout: vertical
icon_color: pink
- type: custom:mushroom-template-card
primary: Available
secondary: >-
{{ states('sensor.prnyellowlvl') }} / {{ states('sensor.prnyellowcap')
}}
icon: mdi:image-filter-none
layout: vertical
icon_color: amber
- type: custom:mushroom-template-card
primary: Available
secondary: >-
{{ states('sensor.prnblacklvl') }} / {{ states('sensor.prnblackcap')
}}
icon: mdi:image-filter-none
layout: vertical
icon_color: black
- type: horizontal-stack
cards:
- type: custom:bar-card
icon: mdi:water
columns: 4
height: 150
value: outside
entities:
- entity: sensor.cyan_toner_level
color: cyan
direction: up
name: Cyan
- entity: sensor.magenta_toner_level
color: magenta
direction: up
name: Magenta
- entity: sensor.yellow_toner_level
color: yellow
direction: up
name: Yellow
- entity: sensor.black_toner_level
color: grey
direction: up
name: Black
limit_value: true
5 Likes
Phil406
(KAT)
September 25, 2022, 1:21pm
23
Wonderful looking lovelace card. If you want to have the rounded card borders as mine, just change the values to 20px as shown in the below picture.
Phil406
(KAT)
September 25, 2022, 4:45pm
24
Also as you are using the black mushroom themes, I think you can change the icon (mdi:image-filter-none) color of the black ink to grey or something like that. Then you we can clearly see the icon.
Phil406
(KAT)
September 27, 2022, 7:20pm
25
Here below a little modification I made using “Stack-in-Card”.
type: vertical-stack
cards:
- type: horizontal-stack
cards:
- type: custom:mushroom-title-card
title: Xerox Workcentre 6515 dni
subtitle: 'Pages Count: {{ states(''sensor.page_count'') }} '
- type: horizontal-stack
cards:
- type: picture
image: /local/images/xerox_workcentre_6515-1.png
tap_action:
action: none
hold_action:
action: none
- type: custom:stack-in-card
cards:
- type: horizontal-stack
cards:
- type: custom:mushroom-template-card
primary: Available
secondary: >-
{{ states('sensor.prncyanlvl') }} / {{ states('sensor.prncyancap')
}}
icon: mdi:image-filter-none
layout: vertical
icon_color: cyan
- type: custom:mushroom-template-card
primary: Available
secondary: >-
{{ states('sensor.prnmagentalvl') }} / {{
states('sensor.prnmagentacap') }}
icon: mdi:image-filter-none
layout: vertical
icon_color: pink
- type: custom:mushroom-template-card
primary: Available
secondary: >-
{{ states('sensor.prnyellowlvl') }} / {{
states('sensor.prnyellowcap') }}
icon: mdi:image-filter-none
layout: vertical
icon_color: amber
- type: custom:mushroom-template-card
primary: Available
secondary: >-
{{ states('sensor.prnblacklvl') }} / {{
states('sensor.prnblackcap') }}
icon: mdi:image-filter-none
layout: vertical
icon_color: black
- type: horizontal-stack
cards:
- type: custom:bar-card
icon: mdi:water
columns: 4
height: 150
value: outside
entities:
- entity: sensor.cyan_toner_level
color: cyan
direction: up
name: Cyan
- entity: sensor.magenta_toner_level
color: magenta
direction: up
name: Magenta
- entity: sensor.yellow_toner_level
color: yellow
direction: up
name: Yellow
- entity: sensor.black_toner_level
color: grey
direction: up
name: Black
limit_value: true
PQ9
(Pedro Quintas)
October 5, 2022, 12:58pm
26
Hello guys,
Do you know any way to get the printer counters?
I get almost every data from the Versalink C405, but can’t get the counters, neither from IPP or SMTP (OID code).
Any way you figure out to get that data into the home assistant?
Thanks for any clue.
I do!
You need to do a mib walk and store the full result in a file. After, and acoording the printer menu settings serach for the counters that you want to add. On a Lexmark device (or HP) this is what is needed:
platform: snmp
host: 192.168.1.160
scan_interval: 120
name: "CX310dn Total Paginas"
unique_id: cx310dn_ltpc
baseoid: 1.3.6.1.2.1.43.10.2.1.4.1.1
unit_of_measurement: pages
Depend on teh implementation and the generation of the printer you can get more counters or not.
1 Like
Hello,
how can I implement this code in Android Studio Java?
Does anyone know?
Thanks
Spacey
(Spacey)
November 26, 2023, 9:50pm
29
Hi!
Thanks for the inspiration & Code - I own a Xerox 6515 as well… but unfortunately the scripts here don’t show the correct things. After some shuffling I found out that my values for Black & Cyan have to be exchanged and Magenta & Cal as well. Then it makes sense!
Phil406
(KAT)
December 5, 2023, 4:09pm
30
I had the same issue, but it was simple to just exchange some value.