AmoebeLabs / AmoebeLabs/flex-horseshoe-card

Example Contribution

オープン
#524 コメント 2 件 リアクション 1 件 担当者 0 名 GitHub で見る
example
主要言語
JavaScript
スター
397
フォーク
66
平均マージ
7分
マージ済み PR(30日)
81

説明

Hi,
I just wanted to pass along a couple examples that are quite different from the others you have. It is for tracking printer toner or ink cartridges. This could be added to your examples documentation.

I use the Internet Printing Protocol (IPP) integration to get printer statistics.

The first example is for a standard color laser printer.
Image

Click to expand the complete YAML configuration

```yaml
aspectratio: 1/1
entities:
- decimals: 0
entity: sensor.hp_color_laserjet_m554_black_cartridge
name: 'Black:'
tap_action:
action: more-info
unit: '%'
- decimals: 0
entity: sensor.hp_color_laserjet_m554_cyan_cartridge
name: 'Cyan:'
tap_action:
action: more-info
unit: '%'
- decimals: 0
entity: sensor.hp_color_laserjet_m554_magenta_cartridge
name: 'Magenta:'
tap_action:
action: more-info
unit: '%'
- decimals: 0
entity: sensor.hp_color_laserjet_m554_yellow_cartridge
name: 'Yellow:'
tap_action:
action: more-info
unit: '%'
- decimals: 0
entity: sensor.hp_color_laserjet_m554_fuser_kit
name: 'Fuser:'
tap_action:
action: more-info
unit: '%'
grid_options:
columns: 12
rows: auto
layout:
horseshoes:
- arc_degrees: 270
color_stops:
'0': '#000000'
'100': '#000000'
entity_index: 0
horseshoe_scale:
color: var(--divider-color)
linecap: round
max: 100
min: 0
styles:
- 'opacity: 0.65;'
width: 6
horseshoe_state:
color: '#000000'
linecap: round
width: 6
id: black_ring
radius: 42
rotate: 0
show:
horseshoe: true
horseshoe_style: fixed
scale_style: fixed
tickmarks: false
start_angle: -90
xpos: 50
ypos: 50
- arc_degrees: 270
color_stops:
'0': '#00BCD4'
'100': '#00BCD4'
entity_index: 1
horseshoe_scale:
color: var(--divider-color)
linecap: round
max: 100
min: 0
styles:
- 'opacity: 0.65;'
width: 6
horseshoe_state:
color: '#00BCD4'
linecap: round
width: 6
id: cyan_ring
radius: 34
rotate: 0
show:
horseshoe: true
horseshoe_style: fixed
scale_style: fixed
tickmarks: false
start_angle: -90
xpos: 50
ypos: 50
- arc_degrees: 270
color_stops:
'0': '#EC008C'
'100': '#EC008C'
entity_index: 2
horseshoe_scale:
color: var(--divider-color)
linecap: round
max: 100
min: 0
styles:
- 'opacity: 0.65;'
width: 6
horseshoe_state:
color: '#EC008C'
linecap: round
width: 6
id: magenta_ring
radius: 26
rotate: 0
show:
horseshoe: true
horseshoe_style: fixed
scale_style: fixed
tickmarks: false
start_angle: -90
xpos: 50
ypos: 50
- arc_degrees: 270
color_stops:
'0': '#FBC02D'
'100': '#FBC02D'
entity_index: 3
horseshoe_scale:
color: var(--divider-color)
linecap: round
max: 100
min: 0
styles:
- 'opacity: 0.65;'
width: 6
horseshoe_state:
color: '#FBC02D'
linecap: round
width: 6
id: yellow_ring
radius: 18
rotate: 0
show:
horseshoe: true
horseshoe_style: fixed
scale_style: fixed
tickmarks: false
start_angle: -90
xpos: 50
ypos: 50
- arc_degrees: 270
color_stops:
'0': '#8E8E93'
'100': '#8E8E93'
entity_index: 4
horseshoe_scale:
color: var(--divider-color)
linecap: round
max: 100
min: 0
styles:
- 'opacity: 0.65;'
width: 6
horseshoe_state:
color: '#8E8E93'
linecap: round
width: 6
id: fuser_ring
radius: 10
rotate: 0
show:
horseshoe: true
horseshoe_style: fixed
scale_style: fixed
tickmarks: false
start_angle: -90
xpos: 50
ypos: 50
names:
- entity_index: 0
id: black_name
styles:
- 'font-size: 5px;'
- 'font-family: var(--ha-font-family-body, Roboto, sans-serif);'
- 'font-weight: 400;'
- 'letter-spacing: normal;'
- 'dominant-baseline: middle;'
- 'fill: var(--primary-text-color);'
- 'text-anchor: end;'
- 'text-transform: none;'
xpos: 42
ypos: 8
- entity_index: 1
id: cyan_name
same_as: black_name
same_as_dypos: 8
- entity_index: 2
id: magenta_name
same_as: cyan_name
same_as_dypos: 8
- entity_index: 3
id: yellow_name
same_as: magenta_name
same_as_dypos: 8
- entity_index: 4
id: fuser_name
same_as: yellow_name
same_as_dypos: 8
states:
- entity_index: 0
id: black_state
styles:
- 'font-size: 5px;'
- 'font-family: var(--ha-font-family-body, Roboto, sans-serif);'
- 'font-weight: 600;'
- 'letter-spacing: normal;'
- 'dominant-baseline: middle;'
- 'fill: var(--primary-text-color);'
- 'text-anchor: start;'
xpos: 44
ypos: 8
- entity_index: 1
id: cyan_state
same_as: black_state
same_as_dypos: 8
- entity_index: 2
id: magenta_state
same_as: cyan_state
same_as_dypos: 8
- entity_index: 3
id: yellow_state
same_as: magenta_state
same_as_dypos: 8
- entity_index: 4
id: fuser_state
same_as: yellow_state
same_as_dypos: 8
type: custom:flex-horseshoe-card
```

The second example is for an inkjet printer.
Image

Click to expand the complete YAML configuration

```yaml
aspectratio: 1/1
entities:
- decimals: 0
entity: sensor.canon_pro_200s_series_black
name: 'Black:'
tap_action:
action: more-info
unit: '%'
- decimals: 0
entity: sensor.canon_pro_200s_series_cyan
name: 'Cyan:'
tap_action:
action: more-info
unit: '%'
- decimals: 0
entity: sensor.canon_pro_200s_series_gray
name: 'Grey:'
tap_action:
action: more-info
unit: '%'
- decimals: 0
entity: sensor.canon_pro_200s_series_light_gray
name: 'Light Grey:'
tap_action:
action: more-info
unit: '%'
- decimals: 0
entity: sensor.canon_pro_200s_series_magenta
name: 'Magenta:'
tap_action:
action: more-info
unit: '%'
- decimals: 0
entity: sensor.canon_pro_200s_series_photo_cyan
name: 'Photo Cyan:'
tap_action:
action: more-info
unit: '%'
- decimals: 0
entity: sensor.canon_pro_200s_series_photo_magenta
name: 'Photo Magenta:'
tap_action:
action: more-info
unit: '%'
- decimals: 0
entity: sensor.canon_pro_200s_series_yellow
name: 'Yellow:'
tap_action:
action: more-info
unit: '%'
grid_options:
columns: 12
rows: auto
layout:
horseshoes:
- arc_degrees: 270
color_stops:
'0': '#000000'
'100': '#000000'
entity_index: 0
horseshoe_scale:
color: var(--divider-color)
linecap: round
max: 100
min: 0
styles:
- 'opacity: 0.65;'
width: 4
horseshoe_state:
color: '#000000'
linecap: round
width: 4
id: black_ring
radius: 44
rotate: 0
show:
horseshoe: true
horseshoe_style: fixed
scale_style: fixed
tickmarks: false
start_angle: -90
xpos: 50
ypos: 50
- arc_degrees: 270
color_stops:
'0': '#00BCD4'
'100': '#00BCD4'
entity_index: 1
horseshoe_scale:
color: var(--divider-color)
linecap: round
max: 100
min: 0
styles:
- 'opacity: 0.65;'
width: 4
horseshoe_state:
color: '#00BCD4'
linecap: round
width: 4
id: cyan_ring
radius: 38.5
rotate: 0
show:
horseshoe: true
horseshoe_style: fixed
scale_style: fixed
tickmarks: false
start_angle: -90
xpos: 50
ypos: 50
- arc_degrees: 270
color_stops:
'0': '#8E8E93'
'100': '#8E8E93'
entity_index: 2
horseshoe_scale:
color: var(--divider-color)
linecap: round
max: 100
min: 0
styles:
- 'opacity: 0.65;'
width: 4
horseshoe_state:
color: '#8E8E93'
linecap: round
width: 4
id: grey_ring
radius: 33
rotate: 0
show:
horseshoe: true
horseshoe_style: fixed
scale_style: fixed
tickmarks: false
start_angle: -90
xpos: 50
ypos: 50
- arc_degrees: 270
color_stops:
'0': '#C7C7CC'
'100': '#C7C7CC'
entity_index: 3
horseshoe_scale:
color: var(--divider-color)
linecap: round
max: 100
min: 0
styles:
- 'opacity: 0.65;'
width: 4
horseshoe_state:
color: '#C7C7CC'
linecap: round
width: 4
id: light_grey_ring
radius: 27.5
rotate: 0
show:
horseshoe: true
horseshoe_style: fixed
scale_style: fixed
tickmarks: false
start_angle: -90
xpos: 50
ypos: 50
- arc_degrees: 270
color_stops:
'0': '#EC008C'
'100': '#EC008C'
entity_index: 4
horseshoe_scale:
color: var(--divider-color)
linecap: round
max: 100
min: 0
styles:
- 'opacity: 0.65;'
width: 4
horseshoe_state:
color: '#EC008C'
linecap: round
width: 4
id: magenta_ring
radius: 22
rotate: 0
show:
horseshoe: true
horseshoe_style: fixed
scale_style: fixed
tickmarks: false
start_angle: -90
xpos: 50
ypos: 50
- arc_degrees: 270
color_stops:
'0': '#6FE7F0'
'100': '#6FE7F0'
entity_index: 5
horseshoe_scale:
color: var(--divider-color)
linecap: round
max: 100
min: 0
styles:
- 'opacity: 0.65;'
width: 4
horseshoe_state:
color: '#6FE7F0'
linecap: round
width: 4
id: photo_cyan_ring
radius: 16.5
rotate: 0
show:
horseshoe: true
horseshoe_style: fixed
scale_style: fixed
tickmarks: false
start_angle: -90
xpos: 50
ypos: 50
- arc_degrees: 270
color_stops:
'0': '#F062C0'
'100': '#F062C0'
entity_index: 6
horseshoe_scale:
color: var(--divider-color)
linecap: round
max: 100
min: 0
styles:
- 'opacity: 0.65;'
width: 4
horseshoe_state:
color: '#F062C0'
linecap: round
width: 4
id: photo_magenta_ring
radius: 11
rotate: 0
show:
horseshoe: true
horseshoe_style: fixed
scale_style: fixed
tickmarks: false
start_angle: -90
xpos: 50
ypos: 50
- arc_degrees: 270
color_stops:
'0': '#FBC02D'
'100': '#FBC02D'
entity_index: 7
horseshoe_scale:
color: var(--divider-color)
linecap: round
max: 100
min: 0
styles:
- 'opacity: 0.65;'
width: 4
horseshoe_state:
color: '#FBC02D'
linecap: round
width: 4
id: yellow_ring
radius: 5.5
rotate: 0
show:
horseshoe: true
horseshoe_style: fixed
scale_style: fixed
tickmarks: false
start_angle: -90
xpos: 50
ypos: 50
names:
- entity_index: 0
id: black_name
styles:
- 'font-size: 5px;'
- 'font-family: var(--ha-font-family-body, Roboto, sans-serif);'
- 'font-weight: 400;'
- 'letter-spacing: normal;'
- 'dominant-baseline: middle;'
- 'fill: var(--primary-text-color);'
- 'text-anchor: end;'
- 'text-transform: none;'
xpos: 39
ypos: 6
- entity_index: 1
id: cyan_name
same_as: black_name
same_as_dypos: 5.5
- entity_index: 2
id: grey_name
same_as: cyan_name
same_as_dypos: 5.5
- entity_index: 3
id: light_grey_name
same_as: grey_name
same_as_dypos: 5.5
- entity_index: 4
id: magenta_name
same_as: light_grey_name
same_as_dypos: 5.5
- entity_index: 5
id: photo_cyan_name
same_as: magenta_name
same_as_dypos: 5.5
- entity_index: 6
id: photo_magenta_name
same_as: photo_cyan_name
same_as_dypos: 5.5
- entity_index: 7
id: yellow_name
same_as: photo_magenta_name
same_as_dypos: 5.5
states:
- entity_index: 0
id: black_state
styles:
- 'font-size: 5px;'
- 'font-family: var(--ha-font-family-body, Roboto, sans-serif);'
- 'font-weight: 600;'
- 'letter-spacing: normal;'
- 'dominant-baseline: middle;'
- 'fill: var(--primary-text-color);'
- 'text-anchor: start;'
xpos: 41
ypos: 6
- entity_index: 1
id: cyan_state
same_as: black_state
same_as_dypos: 5.5
- entity_index: 2
id: grey_state
same_as: cyan_state
same_as_dypos: 5.5
- entity_index: 3
id: light_grey_state
same_as: grey_state
same_as_dypos: 5.5
- entity_index: 4
id: magenta_state
same_as: light_grey_state
same_as_dypos: 5.5
- entity_index: 5
id: photo_cyan_state
same_as: magenta_state
same_as_dypos: 5.5
- entity_index: 6
id: photo_magenta_state
same_as: photo_cyan_state
same_as_dypos: 5.5
- entity_index: 7
id: yellow_state
same_as: photo_magenta_state
same_as_dypos: 5.5
type: custom:flex-horseshoe-card
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。