Open pittbull opened 2 years ago
The following is logged in the HA:
2022-11-03 19:42:57.617 INFO (MainThread) [homeassistant.components.script.vtr300_system_popup] vtr300_system_popup: Running script sequence
2022-11-03 19:42:57.617 INFO (MainThread) [homeassistant.components.script.vtr300_system_popup] vtr300_system_popup: Executing step call service
2022-11-03 19:42:57.618 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'deviceID' is undefined when rendering '{{ deviceID }}'
2022-11-03 19:42:58.919 INFO (MainThread) [homeassistant.components.script.vtr300_system_popup] vtr300_system_popup: Running script sequence
2022-11-03 19:42:58.919 INFO (MainThread) [homeassistant.components.script.vtr300_system_popup] vtr300_system_popup: Executing step call service
2022-11-03 19:42:58.919 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'deviceID' is undefined when rendering '{{ deviceID }}'
Seems this started after the browser_mod update. Not sure how to fix it.
You just need to update your scripts to match the new formatting for Browser_mod. Replace data_template with data, and replace card with content. In addition deviceID has been replaced with browser_id, so you need to update the cards in the UI as well.
Below is the code for Frikjøling, where I have made the modifications as a reference.
Modified script for frikjøling:
#------------------------------ VTR300 Frikjøling Popup ---------------------------|
vtr300_frecooling_popup:
sequence:
- service: browser_mod.popup
data:
deviceID: "{{ browser_id }}"
title: Frikjøling/Nattkjøling
content:
type: entities
entities:
- entity: sensor.vtr300_freecooling_state
- entity: input_number.vtr300_freecooling_start_outdoor_daytime_min_temp
- entity: input_number.vtr300_freecooling_stop_outdoor_temp_hi_sp
name: Utetemp. høy grense
- entity: input_number.vtr300_freecooling_stop_outdoor_temp_lo_sp
name: Utetemp. lav grense
- entity: input_number.vtr300_freecooling_stop_extractair_temp_lo_sp
name: Avtrekk lav grense
- entity: input_datetime.vtr300_freecool_night_prd_start_sp
- entity: input_datetime.vtr300_freecool_night_prd_end_sp
- entity: input_select.vtr300_freecooling_supply_fan_level_set
icon: 'mdi:weather-windy'
- entity: input_select.vtr300_freecooling_extract_fan_level_set
icon: 'mdi:weather-windy'
Modified code for button in vertical stack card:
type: custom:button-card
color: grey
name: Frikjøling
icon: mdi:tools
aspect_ratio: 1.5
show_state: false
tap_action:
action: fire-dom-event
browser_mod:
command: call-service
service: script.vtr300_frecooling_popup
data:
browser_id: this
styles:
card:
- font-size: 12px
- filter: opacity(80%)
- '--mdc-ripple-color': yellow
- '--mdc-ripple-press-opacity': 0.5
grid:
- grid-template-areas: '"i" "n" "s"'
- grid-template-columns: 1fr
- grid-template-rows: 1fr min-content min-content
img_cell:
- align-self: start
- text-align: start
name:
- justify-self: middle
- padding-left: 0px
- font-weight: ''
state:
- justify-self: start
- padding-left: 10px
label:
- font-size: 11px
state:
- value: 'off'
styles:
card:
- filter: opacity(50%)
icon:
- filter: grayscale(100%)
show_label: false
size: 80%
I have done the changes highlighted but the error is still there - and no popups. The wording has changed from "deviceID" to "browser_id"
Family, full time work and school i stealing all my time. Im still running the old version of browser_mod but will when time allows it, get my head into this and update the config. Other projects have also been prioritized, sorry.
Confirming code changes solving the issue, but: when updating to new browser_mod you need to enable "auto register browser", else the code will not work.
Confirming code changes solving the issue,
Sorry for my absence... Just updated the Browser Mod myself, but the pop-up's opens on all registered browsers, that was annoying... Did not find a solution around it other then move the scripts to UI, that solved the pop-up on all registered browser to go away.
How did you get the pop-up's not to show up on all registered browsers and still using the scripts? (as i would like to keep the scripts).
hehe... I was actually not aware of this issue, but I can confirm that I have the same problem - popup opens on all browser.
New issues I recently discoverd: The following button dosen't seem to work anymore:
Any insight?