thomasloven / hass-browser_mod

🔹 A Home Assistant integration to turn your browser into a controllable entity and media player
MIT License
1.3k stars 185 forks source link

Add Old Popup Instantiation Method #53

Closed jazzyisj closed 4 years ago

jazzyisj commented 4 years ago

Any chance the the old method of instantiating popups can be brought into browser_mod? I currently have to keep the old popups plugin installed for a couple of items in my configuration and am concerned that it has been deprecated and will not be maintained.

On example where I use the old version is to pop a thermostat card from a temperature graph on my Home view as a space saving/decluttering measure. Even though I get a more-info popup clicking on the graph when a popup has not been defined the new popup does not work here.

The old popup plugin is tied to the temperature sensor and (in addition to working where the browser_mod popup does not) it is very useful as I can pop up a thermostat from anywhere the temperature sensor has been displayed without having to define it for each entity.

Capture

type: custom:mini-graph-card
name: Temperature
hours_to_show: 72
entities:
  - entity: sensor.upstairs_thermostat_temperature
    name: Temperature
    tap_action: #ISSUE doesn't work here
      action: call-service
      service: browser_mod.popup
      service_data:
        deviceID: this
        title: Upstairs Thermostat
VDRainer commented 4 years ago

Do you mean the feature to replace the more-info dialog globaly or just in a view? That is back since v15 https://github.com/thomasloven/hass-browser_mod/releases/tag/15

jazzyisj commented 4 years ago

@VDRainer Huh. Dunno how I missed that because I love me my popup cards. I know it wasn't working at one point on the mini-graphs because I definitely tried configuring them every which way.

I did catch this update https://github.com/kalkih/mini-graph-card/pull/202 to the mini graph card. The browser_mod.popup service still doesn't work individual entities in minigraphs however the new tap-action option for the entire graph absolutely does!

I've also tested the updated browser_mod global method you so kindly pointed out and you're right it does work now and that's good enough for me! It was painless too - I just had to remove the old popup reference from the resources configuration and I was good to go.

Thanks for pointing it out and as always thanks to @thomasloven for being the lovelace god he is in the first place. Issue closed.