mattlward
(Matt Ward)
August 6, 2020, 10:08pm
1
I am trying to get a card to open a web page when clicked to my printer management interface. I cannot seem to make it work in any way.
type: glance
title: Canon Laser (192.168.1.13)
show_name: false
tap_action:
action: url
url_path: 192.168.1.13
entities:
- sensor.cnmf642c_643c_644c
The complaint in the editor:
Expected a value of type `undefined` for `tap_action` but received `{"action":"url","url_path":"192.168.1.13"}`.
Is this even possible?
tom_l
August 6, 2020, 10:13pm
2
Try;
url_path: http://192.168.1.13
mattlward
(Matt Ward)
August 6, 2020, 10:16pm
3
That change results in this error and no action:
Expected a value of type `undefined` for `tap_action` but received `{"action":"url","url_path":"http://192.168.1.13"}`.
mattlward
(Matt Ward)
August 7, 2020, 7:08pm
4
Is nobody using the feature?
akeslo
(makethishomesmart.com)
January 9, 2021, 3:34am
5
@mattlward did you find a solution for this?
mattlward
(Matt Ward)
January 15, 2021, 8:19pm
6
No, i can make a basic button work. But, title: and name: do not work. Only the printer icon is displayed. This is from the front end editor
type: button
show_name: false
tap_action:
action: url
url_path: 'http://192.168.1.13'
entity: sensor.cnmf642c_643c_644c
icon_height: 30px
title: Canon Laser Web Interface
name: Canon Laser Web Interface
My unified printer pane does not even try to work with it…
cards:
- cards:
- entities:
- sensor.cnmf642c_643c_644c
show_name: false
tap_action:
action: url
url_path: 'http://192.168.1.13'
title: Canon Laser (192.168.1.13)
type: glance
- cards:
- entity: sensor.cnmf642c_643c_644c_canon_cartridge_054_black_toner
max: 100
min: 0
severity:
green: 60
red: 0
yellow: 20
type: gauge
- entity: sensor.cnmf642c_643c_644c_canon_cartridge_054_cyan_toner
max: 100
min: 0
severity:
green: 60
red: 0
yellow: 20
type: gauge
- entity: sensor.cnmf642c_643c_644c_canon_cartridge_054_magenta_to
max: 100
min: 0
severity:
green: 60
red: 0
yellow: 20
type: gauge
- entity: sensor.cnmf642c_643c_644c_canon_cartridge_054_yellow_ton
max: 100
min: 0
severity:
green: 60
red: 0
yellow: 20
type: gauge
type: horizontal-stack
- cards:
- entities:
- sensor.canon_mg7100_series
show_name: false
title: Canon InkJet (192.168.1.12)
type: glance
- cards:
- entity: sensor.canon_mg7100_series_black_bk
max: 100
min: 0
severity:
green: 60
red: 0
yellow: 20
type: gauge
- entity: sensor.canon_mg7100_series_black_pgbk
max: 100
min: 0
severity:
green: 60
red: 0
yellow: 20
type: gauge
type: horizontal-stack
- cards:
- entity: sensor.canon_mg7100_series_magenta
max: 100
min: 0
severity:
green: 60
red: 0
yellow: 20
type: gauge
- entity: sensor.canon_mg7100_series_yellow
max: 100
min: 0
severity:
green: 60
red: 0
yellow: 20
type: gauge
- entity: sensor.canon_mg7100_series_cyan
max: 100
min: 0
severity:
green: 60
red: 0
yellow: 20
type: gauge
- entity: sensor.canon_mg7100_series_gray
max: 100
min: 0
severity:
green: 60
red: 0
yellow: 20
type: gauge
type: horizontal-stack
type: vertical-stack
type: vertical-stack
type: vertical-stack
Try it without the “_path”. Also try adding “new_tab” also.
Mine works like that:
tap_action:
action: url
url: 'http://192.168.1.13'
new_tab: true
It looks there is a documentation error or they’re missing info?
mattlward
(Matt Ward)
December 22, 2023, 5:53pm
8
No change… I am not completely sure what I should click on… I think it would be one of the items in the box. I assume it is something in the structure of the card.
cards:
- cards:
- entities:
- sensor.cnmf642c_643c_644c
show_name: false
tap_action:
action: url
url: http://192.168.1.13
new_tab: true
title: Canon Laser (192.168.1.13)
type: glance
- cards:
- entity: sensor.cnmf642c_643c_644c_canon_cartridge_054_black_toner
max: 100
min: 0
severity:
green: 60
red: 0
yellow: 20
type: gauge
- entity: sensor.cnmf642c_643c_644c_canon_cartridge_054_cyan_toner
max: 100
min: 0
severity:
green: 60
red: 0
yellow: 20
type: gauge
- entity: sensor.cnmf642c_643c_644c_canon_cartridge_054_magenta_to
max: 100
min: 0
severity:
green: 60
red: 0
yellow: 20
type: gauge
- entity: sensor.cnmf642c_643c_644c_canon_cartridge_054_yellow_ton
max: 100
min: 0
severity:
green: 60
red: 0
yellow: 20
type: gauge
type: horizontal-stack
type: vertical-stack
type: vertical-stack
From the 1st post in this thread people are trying to do smth what is not supported.
Tap_action is only supported for an entity inside Glance card, not for the whole card !!!
This is wrong:
type: glance
entities:
- entity: sun.sun
tap_action:
action: url
url_path: https://www.home-assistant.io
This does work:
type: glance
entities:
- entity: sun.sun
tap_action:
action: url
url_path: https://www.home-assistant.io
RTFM
2 Likes