concernant le popup-pac:
le code du pop-up
Il y a tout d’abord la syntaxe du pop-up sur une tap action puis le code de la carte (a partir de la ligne type : vertical-stack):
Note qu’il faut browser_mod pour générer ces pop-ups.
Tu peux aussi copier juste la carte en ne prenant pas les 7 premières lignes…
tap_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popup
data:
title: PAC etage
content:
type: vertical-stack
cards:
- type: custom:mushroom-chips-card
chips:
- type: template
entity: input_boolean.chauffage_mode_auto
icon: >-
{% if is_state('input_boolean.chauffage_mode_auto', 'on')
%}
mdi:cog-refresh
{% elif is_state('input_boolean.chauffage_mode_auto',
'off') %}
mdi:cog-off
{% else %}
mdi:comment-question
{% endif %}
icon_color: >-
{% if is_state('input_boolean.chauffage_mode_auto', 'on')
%}
green
{% elif is_state('input_boolean.chauffage_mode_auto',
'off') %}
red
{% else %}
orange
{% endif %}
content: >-
{% if is_state('input_boolean.chauffage_mode_auto', 'on')
%}
Mode général: Auto
{% elif is_state('input_boolean.chauffage_mode_auto',
'off') %}
Mode général: Manuel
{% else %}
Inconnu
{% endif %}
tap_action:
action: toggle
hold_action:
action: more-info
double_tap_action:
action: more-info
- type: template
entity: input_boolean.pac_override_temporaire
icon: >-
{% if is_state('input_boolean.pac_override_temporaire',
'on') %}
mdi:cog-pause
{% elif is_state('input_boolean.pac_override_temporaire',
'off') %}
mdi:cog-refresh
{% else %}
mdi:comment-question
{% endif %}
icon_color: >-
{% if is_state('input_boolean.pac_override_temporaire',
'on') %}
orange
{% elif is_state('input_boolean.pac_override_temporaire',
'off') %}
green
{% else %}
orange
{% endif %}
content: >-
{% if is_state('input_boolean.pac_override_temporaire',
'on') %}
Mode temporaire: Manuel
{% elif is_state('input_boolean.pac_override_temporaire',
'off') %}
Mode temporaire: Auto
{% else %}
Inconnu
{% endif %}
tap_action:
action: toggle
hold_action:
action: more-info
double_tap_action:
action: more-info
- type: conditional
conditions:
- entity: input_boolean.saison_chauffage
state: 'on'
chip:
type: template
double_tap_action:
action: more-info
entity: schedule.planning_chauffage
icon: >-
{% if is_state('schedule.planning_chauffage', 'on') %}
mdi:fire
{% elif is_state('schedule.planning_chauffage', 'off')
%}
mdi:fire-off
{% else %}
mdi:comment-question
{% endif %}
icon_color: >-
{% if is_state('schedule.planning_chauffage', 'on') %}
orange
{% elif is_state('schedule.planning_chauffage', 'off')
%}
grey
{% else %}
orange
{% endif %}
content: >-
{% if is_state('schedule.planning_chauffage', 'on') %}
Auto: chaud
{{states('input_number.temperature_confort_hiver')}}°C
{% elif is_state('schedule.planning_chauffage', 'off')
%}
Auto: off
{% else %}
Inconnu
{% endif %}
tap_action:
action: more-info
hold_action:
action: more-info
- type: conditional
conditions:
- entity: input_boolean.saison_climatistion
state: 'on'
chip:
type: template
entity: schedule.planning_climatisation
icon: >-
{% if is_state('schedule.planning_climatisation', 'on')
%}
mdi:snowflake
{% elif is_state('schedule.planning_climatisation',
'off') %}
mdi:snowflake-off
{% else %}
mdi:comment-question
{% endif %}
icon_color: >-
{% if is_state('schedule.planning_climatisation', 'on')
%}
light-blue
{% elif is_state('schedule.planning_climatisation',
'off') %}
grey
{% else %}
orange
{% endif %}
content: >-
{% if is_state('schedule.planning_climatisation', 'on')
%}
Auto: froid
{{states('input_number.temperature_cible_climatisation')}}°C
{% elif is_state('schedule.planning_climatisation',
'off') %}
Auto: off
{% else %}
Inconnu
{% endif %}
tap_action:
action: more-info
hold_action:
action: more-info
double_tap_action:
action: more-info
- type: conditional
conditions:
- condition: state
entity: input_boolean.tarif_rouge
state: 'on'
chip:
type: entity
entity: input_boolean.tarif_rouge
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
content_info: name
icon_color: red
- type: action
icon_color: orange
tap_action:
action: none
hold_action:
action: call-service
service: script.allumer_chauffage
target: {}
double_tap_action:
action: none
icon: mdi:fire
- type: action
tap_action:
action: none
hold_action:
action: call-service
service: script.allumer_climatisation
target: {}
double_tap_action:
action: none
icon: mdi:snowflake
icon_color: light-blue
- type: action
tap_action:
action: none
hold_action:
action: call-service
service: script.eteindre_pac
target: {}
double_tap_action:
action: none
icon: mdi:stop
icon_color: red
alignment: start
- type: thermostat
entity: climate.pac
Le code de la carte complete
Le pop up est généré sur l’appui sur le premier bouton (en forme de flame car saison de chauffe). Ci joint le code de la carte complete…
type: custom:vertical-stack-in-card
cards:
- type: custom:mushroom-template-card
entity: group.lumieres_escalier
icon: mdi:stairs
icon_color: |
{% if is_state(entity, 'on') %}
#03A9F4
{% else %}
grey
{% endif %}
primary: Escalier
secondary: '{{ states(''sensor.pac_room_temperature'') }}°C'
layout: horizontal
tap_action:
action: navigate
navigation_path: /lovelace-smartphone/escalier
double_tap_action:
action: navigate
navigation_path: /lovelace-smartphone/escalier
hold_action:
action: toggle
badge_icon: |
{% if is_state('binary_sensor.0x00124b00246e9df7_occupancy', 'on') %}
mdi:motion-sensor
{% else %}
mdi:motion-sensor-off
{% endif %}
badge_color: |
{% if is_state('binary_sensor.0x00124b00246e9df7_occupancy', 'on') %}
orange
{% else %}
grey
{% endif %}
- type: custom:mushroom-chips-card
chips:
- type: template
entity: climate.pac
icon: |-
{% if is_state(entity, 'heat') %}
mdi:fire
{% elif is_state(entity, 'cool') %}
mdi:snowflake
{% elif is_state('input_boolean.saison_chauffage', 'on') %}
mdi:fire
{% elif is_state('input_boolean.saison_climatistion', 'on') %}
mdi:snowflake
{% else %}
mdi:fan
{% endif %}
tap_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popup
data:
title: PAC etage
content:
type: vertical-stack
cards:
- type: custom:mushroom-chips-card
chips:
- type: template
entity: input_boolean.chauffage_mode_auto
icon: >-
{% if is_state('input_boolean.chauffage_mode_auto',
'on') %}
mdi:cog-refresh
{% elif is_state('input_boolean.chauffage_mode_auto',
'off') %}
mdi:cog-off
{% else %}
mdi:comment-question
{% endif %}
icon_color: >-
{% if is_state('input_boolean.chauffage_mode_auto',
'on') %}
green
{% elif is_state('input_boolean.chauffage_mode_auto',
'off') %}
red
{% else %}
orange
{% endif %}
content: >-
{% if is_state('input_boolean.chauffage_mode_auto',
'on') %}
Mode général: Auto
{% elif is_state('input_boolean.chauffage_mode_auto',
'off') %}
Mode général: Manuel
{% else %}
Inconnu
{% endif %}
tap_action:
action: toggle
hold_action:
action: more-info
double_tap_action:
action: more-info
- type: template
entity: input_boolean.pac_override_temporaire
icon: >-
{% if
is_state('input_boolean.pac_override_temporaire',
'on') %}
mdi:cog-pause
{% elif
is_state('input_boolean.pac_override_temporaire',
'off') %}
mdi:cog-refresh
{% else %}
mdi:comment-question
{% endif %}
icon_color: >-
{% if
is_state('input_boolean.pac_override_temporaire',
'on') %}
orange
{% elif
is_state('input_boolean.pac_override_temporaire',
'off') %}
green
{% else %}
orange
{% endif %}
content: >-
{% if
is_state('input_boolean.pac_override_temporaire',
'on') %}
Mode temporaire: Manuel
{% elif
is_state('input_boolean.pac_override_temporaire',
'off') %}
Mode temporaire: Auto
{% else %}
Inconnu
{% endif %}
tap_action:
action: toggle
hold_action:
action: more-info
double_tap_action:
action: more-info
- type: conditional
conditions:
- entity: input_boolean.saison_chauffage
state: 'on'
chip:
type: template
double_tap_action:
action: more-info
entity: schedule.planning_chauffage
icon: >-
{% if is_state('schedule.planning_chauffage', 'on')
%}
mdi:fire
{% elif is_state('schedule.planning_chauffage',
'off') %}
mdi:fire-off
{% else %}
mdi:comment-question
{% endif %}
icon_color: >-
{% if is_state('schedule.planning_chauffage', 'on')
%}
orange
{% elif is_state('schedule.planning_chauffage',
'off') %}
grey
{% else %}
orange
{% endif %}
content: >-
{% if is_state('schedule.planning_chauffage', 'on')
%}
Auto: chaud
{{states('input_number.temperature_confort_hiver')}}°C
{% elif is_state('schedule.planning_chauffage',
'off') %}
Auto: off
{% else %}
Inconnu
{% endif %}
tap_action:
action: more-info
hold_action:
action: more-info
- type: conditional
conditions:
- entity: input_boolean.saison_climatistion
state: 'on'
chip:
type: template
entity: schedule.planning_climatisation
icon: >-
{% if is_state('schedule.planning_climatisation',
'on') %}
mdi:snowflake
{% elif is_state('schedule.planning_climatisation',
'off') %}
mdi:snowflake-off
{% else %}
mdi:comment-question
{% endif %}
icon_color: >-
{% if is_state('schedule.planning_climatisation',
'on') %}
light-blue
{% elif is_state('schedule.planning_climatisation',
'off') %}
grey
{% else %}
orange
{% endif %}
content: >-
{% if is_state('schedule.planning_climatisation',
'on') %}
Auto: froid
{{states('input_number.temperature_cible_climatisation')}}°C
{% elif is_state('schedule.planning_climatisation',
'off') %}
Auto: off
{% else %}
Inconnu
{% endif %}
tap_action:
action: more-info
hold_action:
action: more-info
double_tap_action:
action: more-info
- type: conditional
conditions:
- condition: state
entity: input_boolean.tarif_rouge
state: 'on'
chip:
type: entity
entity: input_boolean.tarif_rouge
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
content_info: name
icon_color: red
- type: action
icon_color: orange
tap_action:
action: none
hold_action:
action: call-service
service: script.allumer_chauffage
target: {}
double_tap_action:
action: none
icon: mdi:fire
- type: action
tap_action:
action: none
hold_action:
action: call-service
service: script.allumer_climatisation
target: {}
double_tap_action:
action: none
icon: mdi:snowflake
icon_color: light-blue
- type: action
tap_action:
action: none
hold_action:
action: call-service
service: script.eteindre_pac
target: {}
double_tap_action:
action: none
icon: mdi:stop
icon_color: red
alignment: start
- type: thermostat
entity: climate.pac
icon_color: |-
{% if is_state(entity, 'heat') %}
orange
{% elif is_state(entity, 'cool') %}
blue
{% elif is_state(entity, 'off') %}
grey
{% else %}
grey
{% endif %}
hold_action:
action: navigate
navigation_path: /lovelace-smartphone/gestion-pac-gainable
double_tap_action:
action: navigate
navigation_path: /lovelace-smartphone/gestion-pac-gainable
- type: template
entity: vacuum.roomba
icon: |-
{% if is_state(entity, 'cleaning') %}
mdi:robot-vacuum
{% elif is_state(entity, 'docked') %}
mdi:robot-vacuum
{% elif is_state(entity, 'paused') %}
mdi:robot-vacuum
{% else %}
mdi:robot-vacuum-alert
{% endif %}
icon_color: |-
{% if is_state(entity, 'cleaning') %}
green
{% elif is_state(entity, 'paused') %}
blue
{% elif is_state(entity, 'docked') %}
grey
{% else %}
orange
{% endif %}
tap_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popup
data:
title: Roomba
content:
type: vertical-stack
cards:
- type: custom:mushroom-vacuum-card
entity: vacuum.roomba
commands:
- start_pause
- stop
- locate
- return_home
- type: custom:mushroom-chips-card
chips:
- type: entity
entity: sensor.roomba_battery_level
- type: template
tap_action:
action: call-service
service: vacuum.send_command
data:
entity_id: vacuum.roomba
command: start
params:
pmap_id: an_v7LHgRNK61qoEMFOKfQ
regions:
- region_id: '17'
type: rid
user_pmapv_id: 221229T095441
icon: mdi:countertop
content: Cuisine
- type: template
tap_action:
action: call-service
service: vacuum.send_command
data:
entity_id: vacuum.roomba
command: start
params:
pmap_id: an_v7LHgRNK61qoEMFOKfQ
regions:
- region_id: '16'
type: rid
user_pmapv_id: 221229T095441
icon: mdi:television
content: TV
- type: template
tap_action:
action: call-service
service: vacuum.send_command
data:
entity_id: vacuum.roomba
command: start
params:
pmap_id: an_v7LHgRNK61qoEMFOKfQ
regions:
- region_id: '0'
type: rid
user_pmapv_id: 221229T095441
icon: mdi:silverware
content: Table
- type: template
tap_action:
action: call-service
service: vacuum.send_command
data:
entity_id: vacuum.roomba
command: start
params:
pmap_id: an_v7LHgRNK61qoEMFOKfQ
regions:
- region_id: '18'
type: rid
user_pmapv_id: 221229T095441
icon: mdi:beer
content: Apéro
- type: template
tap_action:
action: call-service
service: vacuum.send_command
data:
entity_id: vacuum.roomba
command: start
params:
pmap_id: an_v7LHgRNK61qoEMFOKfQ
regions:
- region_id: '15'
type: rid
user_pmapv_id: 221229T095441
icon: mdi:desk
content: Bureau
- type: template
tap_action:
action: call-service
service: vacuum.send_command
data:
entity_id: vacuum.roomba
command: start
params:
pmap_id: an_v7LHgRNK61qoEMFOKfQ
regions:
- region_id: '11'
type: rid
user_pmapv_id: 221229T095441
icon: mdi:bed
content: Chambre
- type: template
tap_action:
action: call-service
service: vacuum.send_command
data:
entity_id: vacuum.roomba
command: start
params:
pmap_id: an_v7LHgRNK61qoEMFOKfQ
regions:
- region_id: '11'
type: rid
user_pmapv_id: 221229T095441
icon: mdi:bathtub
content: Bain
- type: template
tap_action:
action: call-service
service: vacuum.send_command
data:
entity_id: vacuum.roomba
command: start
params:
pmap_id: an_v7LHgRNK61qoEMFOKfQ
regions:
- region_id: '14'
type: rid
user_pmapv_id: 221229T095441
icon: mdi:toilet
content: WC
alignment: justify
- type: template
entity: cover.volet_de_la_mezzanine
hold_action:
action: toggle
tap_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popup
data:
title: Volets Escalier
content:
type: vertical-stack
cards:
- type: custom:mushroom-cover-card
entity: cover.volet_de_la_mezzanine
name: Volet Mezzanine
show_position_control: true
show_tilt_position_control: false
show_buttons_control: true
icon: |-
{% if is_state(entity, 'open') %}
mdi:window-shutter-open
{% elif is_state(entity, 'closed') %}
mdi:window-shutter
{% else %}
mdi:window-shutter-alert
{% endif %}
icon_color: |-
{% if is_state(entity, 'open') %}
grey
{% elif is_state(entity, 'closed') %}
grey
{% else %}
orange
{% endif %}
- type: template
entity: group.lumieres_escalier
tap_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popup
data:
title: Lumières Escalier
content:
type: vertical-stack
cards:
- type: custom:mushroom-light-card
entity: light.0x385b44fffe20eb24
name: Sous escalier
use_light_color: true
show_brightness_control: true
show_color_temp_control: true
show_color_control: false
collapsible_controls: false
- type: custom:mushroom-light-card
entity: light.0x84b4dbfffec93621
name: Mezzanine
use_light_color: true
show_brightness_control: true
show_color_temp_control: true
show_color_control: false
collapsible_controls: false
icon: mdi:lightbulb
hold_action:
action: toggle
icon_color: |-
{% if is_state(entity, 'on') %}
orange
{% elif is_state(entity, 'off') %}
grey
{% else %}
grey
{% endif %}
alignment: end
card_mod:
style:
style: |
ha-card {
padding-top: 0px;
margin-top: -8px;
padding-bottom: 8px;
padding-left: 8px;
padding-right: 8px;
}
Note j’ai aussi une sous vue dédiée avec tous les réglages:
le code
type: vertical-stack
cards:
- type: custom:mushroom-chips-card
chips:
- type: template
entity: input_boolean.chauffage_mode_auto
icon: |-
{% if is_state('input_boolean.chauffage_mode_auto', 'on') %}
mdi:cog-refresh
{% elif is_state('input_boolean.chauffage_mode_auto', 'off') %}
mdi:cog-off
{% else %}
mdi:comment-question
{% endif %}
icon_color: |-
{% if is_state('input_boolean.chauffage_mode_auto', 'on') %}
green
{% elif is_state('input_boolean.chauffage_mode_auto', 'off') %}
red
{% else %}
orange
{% endif %}
content: |-
{% if is_state('input_boolean.chauffage_mode_auto', 'on') %}
Mode général: Auto
{% elif is_state('input_boolean.chauffage_mode_auto', 'off') %}
Mode général: Manuel
{% else %}
Inconnu
{% endif %}
tap_action:
action: toggle
hold_action:
action: more-info
double_tap_action:
action: more-info
- type: template
entity: input_boolean.pac_override_temporaire
icon: |-
{% if is_state('input_boolean.pac_override_temporaire', 'on') %}
mdi:cog-pause
{% elif is_state('input_boolean.pac_override_temporaire', 'off') %}
mdi:cog-refresh
{% else %}
mdi:comment-question
{% endif %}
icon_color: |-
{% if is_state('input_boolean.pac_override_temporaire', 'on') %}
orange
{% elif is_state('input_boolean.pac_override_temporaire', 'off') %}
green
{% else %}
orange
{% endif %}
content: |-
{% if is_state('input_boolean.pac_override_temporaire', 'on') %}
Mode temporaire: Manuel
{% elif is_state('input_boolean.pac_override_temporaire', 'off') %}
Mode temporaire: Auto
{% else %}
Inconnu
{% endif %}
tap_action:
action: toggle
hold_action:
action: more-info
double_tap_action:
action: more-info
- type: conditional
conditions:
- entity: input_boolean.saison_chauffage
state: 'on'
chip:
type: template
double_tap_action:
action: more-info
entity: schedule.planning_chauffage
icon: |-
{% if is_state('schedule.planning_chauffage', 'on') %}
mdi:fire
{% elif is_state('schedule.planning_chauffage', 'off') %}
mdi:fire-off
{% else %}
mdi:comment-question
{% endif %}
icon_color: |-
{% if is_state('schedule.planning_chauffage', 'on') %}
orange
{% elif is_state('schedule.planning_chauffage', 'off') %}
grey
{% else %}
orange
{% endif %}
content: |-
{% if is_state('schedule.planning_chauffage', 'on') %}
Auto: chaud {{states('input_number.temperature_confort_hiver')}}°C
{% elif is_state('schedule.planning_chauffage', 'off') %}
Auto: off
{% else %}
Inconnu
{% endif %}
tap_action:
action: more-info
hold_action:
action: more-info
- type: conditional
conditions:
- entity: input_boolean.saison_climatistion
state: 'on'
chip:
type: template
entity: schedule.planning_climatisation
icon: |-
{% if is_state('schedule.planning_climatisation', 'on') %}
mdi:snowflake
{% elif is_state('schedule.planning_climatisation', 'off') %}
mdi:snowflake-off
{% else %}
mdi:comment-question
{% endif %}
icon_color: |-
{% if is_state('schedule.planning_climatisation', 'on') %}
light-blue
{% elif is_state('schedule.planning_climatisation', 'off') %}
grey
{% else %}
orange
{% endif %}
content: >-
{% if is_state('schedule.planning_climatisation', 'on') %}
Auto: froid
{{states('input_number.temperature_cible_climatisation')}}°C
{% elif is_state('schedule.planning_climatisation', 'off') %}
Auto: off
{% else %}
Inconnu
{% endif %}
tap_action:
action: more-info
hold_action:
action: more-info
double_tap_action:
action: more-info
- type: conditional
conditions:
- condition: state
entity: input_boolean.tarif_rouge
state: 'on'
chip:
type: entity
entity: input_boolean.tarif_rouge
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
content_info: name
icon_color: red
- type: action
icon_color: orange
tap_action:
action: none
hold_action:
action: call-service
service: script.allumer_chauffage
target: {}
double_tap_action:
action: none
icon: mdi:fire
- type: action
tap_action:
action: none
hold_action:
action: call-service
service: script.allumer_climatisation
target: {}
double_tap_action:
action: none
icon: mdi:snowflake
icon_color: light-blue
- type: action
tap_action:
action: none
hold_action:
action: call-service
service: script.eteindre_pac
target: {}
double_tap_action:
action: none
icon: mdi:stop
icon_color: red
alignment: start
- type: thermostat
entity: climate.pac
- type: custom:mod-card
card:
type: custom:text-divider-row
text: Gestion PAC gainable
align: left
- square: false
type: grid
cards:
- type: custom:mushroom-entity-card
entity: input_boolean.chauffage_mode_auto
layout: vertical
tap_action:
action: more-info
hold_action:
action: toggle
double_tap_action:
action: more-info
name: Mode AUTO
icon_color: green
- type: custom:mushroom-entity-card
entity: input_boolean.pac_override_temporaire
layout: vertical
tap_action:
action: more-info
hold_action:
action: toggle
double_tap_action:
action: more-info
name: Manuel Temporaire
icon_color: orange
- type: custom:mushroom-entity-card
entity: input_boolean.tarif_rouge
layout: vertical
tap_action:
action: more-info
hold_action:
action: toggle
double_tap_action:
action: more-info
icon_color: red
columns: 3
- type: custom:mod-card
card:
type: custom:text-divider-row
text: Chauffage
align: left
- square: false
type: grid
cards:
- type: custom:mushroom-entity-card
entity: input_boolean.saison_chauffage
layout: vertical
tap_action:
action: more-info
hold_action:
action: toggle
double_tap_action:
action: more-info
name: Saison Chauffe
icon_color: amber
- type: custom:mushroom-entity-card
entity: schedule.planning_chauffage
layout: vertical
name: Planning chauffe
icon_color: amber
- type: custom:mushroom-number-card
entity: input_number.temperature_confort_hiver
layout: vertical
display_mode: buttons
name: Temperature chauffe
secondary_info: none
icon_color: amber
columns: 3
- type: custom:mod-card
card:
type: custom:text-divider-row
text: Climatisation
align: left
- square: false
type: grid
cards:
- type: custom:mushroom-entity-card
entity: input_boolean.saison_climatistion
layout: vertical
tap_action:
action: more-info
hold_action:
action: toggle
double_tap_action:
action: more-info
name: Saison Clim
icon_color: cyan
- type: custom:mushroom-entity-card
entity: schedule.planning_climatisation
layout: vertical
name: Planning Clim
icon_color: cyan
- type: custom:mushroom-number-card
entity: input_number.temperature_cible_climatisation
layout: vertical
display_mode: buttons
name: Temperature Clim
secondary_info: none
icon_color: cyan
columns: 3