hi,
first of all some informations:
i use this to control my dreame vacum cleaner.
clicking on this Button the browser mod opens the pop-up like it should.
but clicking on the left Button, nothing happens.
if i start the srcipt from developer or directly from scripts it does what it should.
the Problem i have is in the last lines of code:
- type: button
icon: mdi:restore
tap_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popup
data:
title: Sensor zurücksetzen?
content:
type: markdown
content: |
Möchtest du wirklich den Sensor-Reset durchführen?
dismissable: true
right_button: Abbrechen
right_button_action: browser_mod.close_popup
left_button: Reset Sensor
left_button_action:
action: fire-dom-event
browser_mod:
service: script.turn_on
data:
entity_id: script.x40_reset_sensor_new
Here the whole yaml code:
type: custom:stack-in-card
keep:
border_radius: true
margin: true
cards:
- type: custom:vacuum-card
entity: vacuum.x40_ultra_complete
map_refresh: 1
stats:
default:
- attribute: filter_left
unit: "%"
subtitle: Filter
- attribute: side_brush_left
unit: "%"
subtitle: Side brush
- attribute: main_brush_left
unit: "%"
subtitle: Main brush
- attribute: sensor_dirty_left
unit: "%"
subtitle: Sensor
- entity_id: input_boolean.vacuum_off
type: button
tap_action:
action: toggle
value_template: "{{ 'OFF' if is_state('input_boolean.vacuum_off', 'on') else 'ON' }}"
cleaning:
- attribute: cleaned_area
unit: m²
subtitle: Cleaned area
- attribute: cleaning_time
unit: min
subtitle: Cleaning time
shortcuts:
- name: Staubsauger Off
service: input_boolean.toggle
target:
entity_id: input_boolean.vacuum_off
icon: mdi:robot-vacuum-off
- name: Clean Wohnzimmer
service: script.x40_wohnzimmer_putzen
icon: mdi:sofa
- name: Clean Schlafzimmer
service: script.x40_schlafzimmer_putzen
icon: mdi:bed-empty
- name: Clean Küche
service: script.x40_kuche_putzen
icon: mdi:silverware-fork-knife
- name: Clean Badezimmer
service: script.x40_bad_putzen
icon: mdi:toilet
- name: Clean Nebenzimmer
service: script.x40_nebenraum_putzen
icon: mdi:television
- name: Clean Flur
service: script.x40_flur_putzen
icon: mdi:foot-print
filter:
include:
- entity_id: input_boolean.vacuum_off
refresh_interval: 2
- type: custom:fold-entity-row
head:
type: section
label: Warnungen & Fehler
card_mod:
style:
hui-sensor-entity-row:
$ hui-generic-entity-row $: |
.pointer{
color: #91C0F8;
}
.text-content{
color: #e1e1e1;
}
hui-simple-entity-row:
$ hui-generic-entity-row $: |
.pointer{
color: #91C0F8;
}
.text-content{
color: #e1e1e1;
}
entities:
- entity: sensor.x40_ultra_complete_low_water_warning
name: Frischwassertank
- entity: sensor.x40_ultra_complete_error
name: Fehler
- type: custom:stack-in-card
mode: vertical
cards:
- type: tile
name: Teppich Boost
entity: switch.x40_ultra_complete_carpet_boost
state_color: true
tap_action:
action: toggle
- type: tile
name: Base Station Reinigen
entity: button.x40_ultra_complete_base_station_cleaning
state_color: true
tap_action:
action: toggle
- type: tile
name: Custom Clean
entity: switch.x40_ultra_complete_customized_cleaning
state_color: true
tap_action:
action: toggle
- type: tile
name: Heißes Wischen
entity: switch.x40_ultra_complete_hot_washing
state_color: true
tap_action:
action: toggle
- type: tile
name: Teppich zuerst
entity: switch.x40_ultra_complete_clean_carpets_first
state_color: true
tap_action:
action: toggle
- type: tile
name: Seitlich putzen
entity: switch.x40_ultra_complete_side_reach
state_color: true
tap_action:
action: toggle
- type: tile
name: Mop erweitern
entity: switch.x40_ultra_complete_mop_extend
state_color: true
tap_action:
action: toggle
- type: tile
name: Smarte Wasser Temperatur
entity: switch.x40_ultra_complete_smart_mop_washing
state_color: true
tap_action:
action: toggle
- type: tile
name: Wasser Temperatur
entity: select.x40_ultra_complete_water_temperature
state_color: true
features:
- type: select-options
- type: tile
name: Reinigungsmodus
entity: select.x40_ultra_complete_washing_mode
state_color: true
features:
- type: select-options
- type: tile
name: Cleaning Mode
entity: select.x40_ultra_complete_cleaning_mode
state_color: true
features:
- type: select-options
- type: tile
name: Teppich reinigung
entity: select.x40_ultra_complete_carpet_cleaning
state_color: true
features:
- type: select-options
- type: tile
name: Trocknungs-Zeit
entity: select.x40_ultra_complete_drying_time
state_color: true
features:
- type: select-options
- type: tile
name: Saugstärke
entity: select.x40_ultra_complete_suction_level
state_color: true
features:
- type: select-options
- type: tile
name: Mop Feuchtigkeit
entity: select.x40_ultra_complete_mop_pad_humidity
state_color: true
features:
- type: select-options
- type: custom:slider-entity-row
name: Feuchtigkeitslevel
entity: number.x40_ultra_complete_wetness_level
state_color: true
- type: tile
name: O-P Charging
entity: switch.x40_ultra_complete_off_peak_charging
state_color: true
tap_action:
action: toggle
- type: horizontal-stack
cards:
- type: tile
name: Start Laden
entity: time.x40_ultra_complete_off_peak_charging_start
- type: tile
name: Ende Laden
entity: time.x40_ultra_complete_off_peak_charging_end
- type: custom:stack-in-card
mode: horizontal
cards:
- type: horizontal-stack
cards:
- type: custom:bar-card
entities:
- sensor.x40_ultra_complete_main_brush_left
name: Haupt-Bürste
positions:
name: inside
value: inside
indicator: inside
show:
extrema: false
icon: true
name: true
severity:
- color: "#d32f2f"
from: 0
to: 10
- color: "#ffa000"
from: 10
to: 40
- color: "#388e3c"
from: 40
to: 100
card_mod:
style: |
bar-card-backgroundbar {
border-radius: 8px;
}
bar-card-currentbar {
border-radius: 8px;
}
ha-card {
width:170% !important; /* 3/4 der Breite */
}
- type: button
icon: mdi:restore
tap_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popup
data:
title: Haupt_bürste zurücksetzen?
content: Möchtest du wirklich die Haupt-Bürste resettieren?
dismissable: true
right_button: abbruch
right_button_action: browser_mod.close_popup
left_button: Reset Haupt_Bürste
left_button_action: script.x40_reset_main_brush
card_mod:
style: |
bar-card-backgroundbar {
border-radius: 8px;
}
bar-card-currentbar {
border-radius: 8px;
}
ha-card {
width:30% !important; /* 3/4 der Breite */
margin-left: auto;
}
- type: custom:stack-in-card
mode: horizontal
cards:
- type: horizontal-stack
cards:
- type: custom:bar-card
entities:
- sensor.x40_ultra_complete_side_brush_left
name: Neben_Bürste
positions:
name: inside
value: inside
indicator: inside
show:
extrema: false
icon: true
name: true
severity:
- color: "#d32f2f"
from: 0
to: 10
- color: "#ffa000"
from: 10
to: 40
- color: "#388e3c"
from: 40
to: 100
card_mod:
style: |
bar-card-backgroundbar {
border-radius: 8px;
}
bar-card-currentbar {
border-radius: 8px;
}
ha-card {
width:170% !important; /* 3/4 der Breite */
}
- type: button
icon: mdi:restore
tap_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popup
data:
title: Neben Bürste zurücksetzen?
content: Möchtest du wirklich die Neben Bürste resettieren?
dismissable: true
right_button: abbruch
right_button_action: browser_mod.close_popup
left_button: Reset Neben_Bürste
left_button_action: script.x40_reset_side_brush
card_mod:
style: |
bar-card-backgroundbar {
border-radius: 8px;
}
bar-card-currentbar {
border-radius: 8px;
}
ha-card {
width:30% !important; /* 3/4 der Breite */
margin-left: auto;
}
- type: custom:stack-in-card
mode: horizontal
cards:
- type: horizontal-stack
cards:
- type: custom:bar-card
entities:
- sensor.x40_ultra_complete_filter_left
name: Filter
positions:
name: inside
value: inside
indicator: inside
show:
extrema: false
icon: true
name: true
severity:
- color: "#d32f2f"
from: 0
to: 10
- color: "#ffa000"
from: 10
to: 40
- color: "#388e3c"
from: 40
to: 100
card_mod:
style: |
bar-card-backgroundbar {
border-radius: 8px;
}
bar-card-currentbar {
border-radius: 8px;
}
ha-card {
width:170% !important; /* 3/4 der Breite */
}
- type: button
icon: mdi:restore
tap_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popup
data:
title: Filter zurücksetzen?
content: Möchtest du wirklich den Filter-Reset durchführen?
dismissable: true
right_button: abbruch
right_button_action: browser_mod.close_popup
left_button: Reset Filter
left_button_action: script.x40_reset_filter
card_mod:
style: |
bar-card-backgroundbar {
border-radius: 8px;
}
bar-card-currentbar {
border-radius: 8px;
}
ha-card {
width:30% !important; /* 3/4 der Breite */
margin-left: auto;
}
- type: custom:stack-in-card
mode: horizontal
cards:
- type: horizontal-stack
cards:
- type: custom:bar-card
entities:
- sensor.x40_ultra_complete_sensor_dirty_left
name: Sensor
positions:
name: inside
value: inside
indicator: inside
show:
extrema: false
icon: true
name: true
severity:
- color: "#d32f2f"
from: 0
to: 10
- color: "#ffa000"
from: 10
to: 40
- color: "#388e3c"
from: 40
to: 100
card_mod:
style: |
bar-card-backgroundbar {
border-radius: 8px;
}
bar-card-currentbar {
border-radius: 8px;
}
ha-card {
width:170% !important; /* 3/4 der Breite */
}
- type: button
icon: mdi:restore
tap_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popup
data:
title: Sensor zurücksetzen?
content:
type: markdown
content: |
Möchtest du wirklich den Sensor-Reset durchführen?
dismissable: true
right_button: Abbrechen
right_button_action: browser_mod.close_popup
left_button: Reset Sensor
left_button_action:
action: fire-dom-event
browser_mod:
service: script.turn_on
data:
entity_id: script.x40_reset_sensor_new
card_mod:
style: |
bar-card-backgroundbar {
border-radius: 8px;
}
bar-card-currentbar {
border-radius: 8px;
}
ha-card {
width:30% !important; /* 3/4 der Breite */
margin-left: auto;
}