lovelace-state-switch icon indicating copy to clipboard operation
lovelace-state-switch copied to clipboard

Issue with deviceID

Open nghiaphan31 opened this issue 2 years ago • 7 comments

Hello,

I'm trying to use state-switch to display different cards depending on the deviceID, generated by browser-mod. It seems that none of the deviceID ever matches and it's always goes to the default case. See attached screenshot. Capture d’écran 2022-12-05 à 11 31 03 I don't see where I could have missed something.

Can anyone help?

Thanks! Nghia

My code is as follows:

  • type: vertical-stack cards:
    • type: custom:state-switch entity: deviceID default: default states: "c01d517b-b7a0ee24": type : markdown content: > Mobile "b0b2c8d6-27a5d050": type : markdown content: > Desktop via homeassistant.local "da878644-8a7a78a9": type : markdown content: > Desktop via 192.168.. "6ed3fec2-d0982924": type : markdown content: > Desktop via ********.duckdns.org default: type : markdown content: > DEFAULT
    • type: horizontal-stack cards:
      • type : markdown content: > Standard mark down

The registered browsers are:

Registered Browsers b0b2c8d6-27a5d050 (MacBookProNghia via http://homeassistant.local:8123/) Last connected: 28 seconds ago 11fafea3-91279fee (iPad Mini 4 de Nghia) Last connected: 2 weeks ago c01d517b-b7a0ee24 (Galaxy S10 Nghia) Last connected: 10 minutes ago 6ed3fec2-d0982924 (MacBookProNghia via https://*****.duckdns.org) Last connected: 38 seconds ago da878644-8a7a78a9 (MacBookPro Nghia via 192.168..) Last connected: 36 seconds ago

I have the following errors in my logs:

Logger: frontend.js.latest.202211080 Source: components/system_log/init.py:256 First occurred: December 4, 2022 at 10:35:11 PM (75 occurrences) Last logged: 11:29:11 AM

https://.duckdns.org/browser-mod:0:0 Uncaught http://192.168..:8123/lovelace/0:0:0 Uncaught https://.duckdns.org/lovelace-yaml/0:0:0 Uncaught http://homeassistant.local:8123/browser-mod:0:0 Uncaught http://192.168..:8123/config/logs:0:0 Uncaught

nghiaphan31 avatar Dec 05 '22 10:12 nghiaphan31

I forgot to mention that calling the "Browser mod: popup" service from the Developper Tools, I can target each of the registered browsers without any issue. So I really don't understand where the problem could be.

Hello,

I'm trying to use state-switch to display different cards depending on the deviceID, generated by browser-mod. It seems that none of the deviceID ever matches and it's always goes to the default case. See attached screenshot. Capture d’écran 2022-12-05 à 11 31 03 I don't see where I could have missed something.

Can anyone help?

Thanks! Nghia

My code is as follows:

  • type: vertical-stack cards:

    • type: custom:state-switch entity: deviceID default: default states: "c01d517b-b7a0ee24": type : markdown content: > Mobile "b0b2c8d6-27a5d050": type : markdown content: > Desktop via homeassistant.local "da878644-8a7a78a9": type : markdown content: > Desktop via 192.168.. "6ed3fec2-d0982924": type : markdown content: > Desktop via ********.duckdns.org default: type : markdown content: > DEFAULT

    • type: horizontal-stack cards:

      • type : markdown content: > Standard mark down

The registered browsers are:

Registered Browsers b0b2c8d6-27a5d050 (MacBookProNghia via http://homeassistant.local:8123/) Last connected: 28 seconds ago 11fafea3-91279fee (iPad Mini 4 de Nghia) Last connected: 2 weeks ago c01d517b-b7a0ee24 (Galaxy S10 Nghia) Last connected: 10 minutes ago 6ed3fec2-d0982924 (MacBookProNghia via https://*****__.duckdns.org) Last connected: 38 seconds ago da878644-8a7a78a9 (MacBookPro Nghia via 192.168..) Last connected: 36 seconds ago

I have the following errors in my logs:

Logger: frontend.js.latest.202211080 Source: components/system_log/init.py:256 First occurred: December 4, 2022 at 10:35:11 PM (75 occurrences) Last logged: 11:29:11 AM

https://.duckdns.org/browser-mod:0:0 Uncaught http://192.168..:8123/lovelace/0:0:0 Uncaught https://.duckdns.org/lovelace-yaml/0:0:0 Uncaught http://homeassistant.local:8123/browser-mod:0:0 Uncaught http://192.168..:8123/config/logs:0:0 Uncaught

nghiaphan31 avatar Dec 05 '22 11:12 nghiaphan31

Have you made any progress on this, I'm having the exact same issue,

z06Drew avatar Jan 20 '23 21:01 z06Drew

I'm having the same issue as well.

kaizersoje avatar Feb 15 '23 11:02 kaizersoje

Same issue here

burnsy180 avatar Feb 19 '23 03:02 burnsy180

anyone ever fix? same issue here.

madasus avatar May 25 '23 15:05 madasus

same issue here. Anyone got a fix?

gapsna avatar Feb 11 '24 02:02 gapsna

Same issue here. Please can we have a fix, i really miss this feature.

romquenin avatar Aug 10 '24 09:08 romquenin