-
Notifications
You must be signed in to change notification settings - Fork 446
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #679 from basbruss/popup
[Popup media_player] Design update
- Loading branch information
Showing
30 changed files
with
776 additions
and
78 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
custom_cards/custom_card_damix48_power_details/languages/es.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
ulm_custom_card_damix48_power_details_language_variables: | ||
variables: | ||
ulm_custom_card_damix48_power_details_hour: "hora" | ||
ulm_custom_card_damix48_power_details_hours: "horas" | ||
ulm_custom_card_damix48_power_details_in_the_last: "En la última" | ||
ulm_custom_card_damix48_power_details_in_the_lasts: "En las últimas" |
11 changes: 11 additions & 0 deletions
11
custom_cards/custom_card_eraycetinay_elapsed_time/languages/es.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
ulm_custom_card_eraycetinay_elapsed_time_language_variables: | ||
variables: | ||
custom_card_eraycetinay_elapsed_time_day: "día" | ||
custom_card_eraycetinay_elapsed_time_days: "días" | ||
custom_card_eraycetinay_elapsed_time_hour: "hora" | ||
custom_card_eraycetinay_elapsed_time_hours: "horas" | ||
custom_card_eraycetinay_elapsed_time_minute: "minuto" | ||
custom_card_eraycetinay_elapsed_time_minutes: "minutos" | ||
custom_card_eraycetinay_elapsed_time_ago: "atrás" | ||
custom_card_eraycetinay_elapsed_time_justnow: "justo ahora" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
ulm_custom_card_eraycetinay_lock_language_variables: | ||
variables: | ||
custom_card_eraycetinay_lock_locked: "verriegelt" | ||
custom_card_eraycetinay_lock_unlocked: "entriegelt" | ||
custom_card_eraycetinay_lock_locking: "verriegeln" | ||
custom_card_eraycetinay_lock_unlocking: "entriegeln" | ||
custom_card_eraycetinay_lock_unavailable: "nicht verfügbar" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
ulm_custom_card_eraycetinay_lock_language_variables: | ||
variables: | ||
custom_card_eraycetinay_lock_locked: "bloqueado" | ||
custom_card_eraycetinay_lock_unlocked: "desbloqueado" | ||
custom_card_eraycetinay_lock_locking: "bloqueando" | ||
custom_card_eraycetinay_lock_unlocking: "desbloqueando" | ||
custom_card_eraycetinay_lock_unavailable: "no disponible" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
custom_card_heat_pump_language_variables: | ||
variables: | ||
custom_card_heat_pump_off: "Apagada" | ||
custom_card_heat_pump_dry: "Seco" | ||
custom_card_heat_pump_heat: "Calor" | ||
custom_card_heat_pump_heat_cool: "Automático" | ||
custom_card_heat_pump_cool: "Frío" | ||
custom_card_heat_pump_fan_only: "Sólo ventilador" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
custom_cards/custom_card_more_power_outlet/custom_card_more_power_outlet.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
### Custom Card More Power Outlet ### | ||
custom_card_more_power_outlet: | ||
template: | ||
- "icon_info_bg" | ||
- "yellow" | ||
- "ulm_language_variables" | ||
variables: | ||
custom_card_more_power_outlet_power_sensor: | ||
custom_card_more_power_outlet_energy_sensor: | ||
custom_card_more_power_outlet_time_sensor: | ||
triggers_update: "all" | ||
label: |- | ||
[[[ | ||
if (entity.state === "on" && variables.custom_card_more_power_outlet_power_sensor !== null && variables.custom_card_more_power_outlet_energy_sensor !== null && variables.custom_card_more_power_outlet_time_sensor !== null) { | ||
if (states[variables.custom_card_more_power_outlet_time_sensor].state < 1){ | ||
return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh • " + | ||
(states[variables.custom_card_more_power_outlet_time_sensor].state * 100) + "Mins"; | ||
} else | ||
return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh • " + states[variables.custom_card_more_power_outlet_time_sensor].state + "Hrs"; | ||
} else if (entity.state === "on" && variables.custom_card_more_power_outlet_power_sensor !== null && variables.custom_card_more_power_outlet_energy_sensor !== null) { | ||
return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh"; | ||
} else if (entity.state === "on" && variables.custom_card_more_power_outlet_power_sensor !== null && variables.custom_card_more_power_outlet_time_sensor !== null) { | ||
if (states[variables.custom_card_more_power_outlet_time_sensor].state < 1){ | ||
return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + (states[variables.custom_card_more_power_outlet_time_sensor].state * 100) + "Mins"; | ||
} else | ||
return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + states[variables.custom_card_more_power_outlet_time_sensor].state + "Hrs"; | ||
} else if (entity.state === "on" && variables.custom_card_more_power_outlet_energy_sensor !== null && variables.custom_card_more_power_outlet_time_sensor !== null) { | ||
if (states[variables.custom_card_more_power_outlet_time_sensor].state < 1){ | ||
return states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh • " + (states[variables.custom_card_more_power_outlet_time_sensor].state * 100) + "Mins"; | ||
} else | ||
return states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh • " + states[variables.custom_card_more_power_outlet_time_sensor].state + "Hrs"; | ||
} else if (entity.state === "on" && variables.custom_card_more_power_outlet_power_sensor !== null) { | ||
return states[variables.custom_card_more_power_outlet_power_sensor].state + "W"; | ||
} else if (entity.state === "on" && variables.custom_card_more_power_outlet_energy_sensor !== null) { | ||
return states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh"; | ||
} else if (entity.state === "on" && variables.custom_card_more_power_outlet_time_sensor !== null) { | ||
if (states[variables.custom_card_more_power_outlet_time_sensor].state < 1){ | ||
return (states[variables.custom_card_more_power_outlet_time_sensor].state * 100) + "Mins"; | ||
} else | ||
return states[variables.custom_card_more_power_outlet_time_sensor].state + "Hrs"; | ||
} else if (entity.state === "on") { | ||
return variables.ulm_on; | ||
} else if (entity.state === "off" && variables.custom_card_more_power_outlet_energy_sensor !== null) { | ||
if (states[variables.custom_card_more_power_outlet_energy_sensor].state > 0){ | ||
return variables.ulm_off + " • " + states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh"; | ||
} else { | ||
return variables.ulm_off; | ||
} | ||
} else if (entity.state === "off") { | ||
return variables.ulm_off; | ||
} else if (entity.state === "unavailable") { | ||
return variables.ulm_unavailable; | ||
} else { | ||
return entity.state; | ||
} | ||
]]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
--- | ||
title: More Power Outlet Card | ||
--- | ||
<!-- markdownlint-disable MD046 --> | ||
|
||
## Description | ||
|
||
<img width="248" alt="image" src="https://user-images.githubusercontent.com/30660751/167216999-2a911d70-0955-410e-a050-ebdcc4c43706.png"> | ||
|
||
This is the power outlet card is very similar to the default `power-outlet-card` from UI-Minimalist but it is also possible to show two additional sensors - one for total energy and one for time. | ||
|
||
## Credits | ||
|
||
Author: Wranglatang - 2022 Vesion 1.0.0 | ||
|
||
## Variables | ||
|
||
| Variable | Default | Required | Notes | | ||
|----------|---------|------------------|-------------------| | ||
| entity | | :material-check: | | | ||
|name| | :material-check: | Enable background | | ||
|custom_card_more_power_outlet_power_sensor| | :material-close: | If you set this sensor, the `custom_card_more_power_outlet` shows the current power consumption (W). | | ||
|custom_card_more_power_outlet_energy_sensor| | :material-close: | If you set this sensor, the `custom_card_more_power_outlet` shows the energy consumption (kWh) - Typically used with a Daily [Utility Meter](https://www.home-assistant.io/integrations/utility_meter). | | ||
|custom_card_more_power_outlet_time_sensor| | :material-close: | If you set this sensor, the `custom_card_more_power_outlet` shows the a duration (Mins) - Typically used with the [History Stats](https://www.home-assistant.io/integrations/history_stats). | | ||
|
||
## Usage | ||
|
||
```yaml | ||
- type: 'custom:button-card' | ||
template: custom_card_more_power_outlet | ||
variables: | ||
custom_card_more_power_outlet_power_sensor: sensor.immersion_heater_power | ||
custom_card_more_power_outlet_energy_sensor: sensor.immersion_heater_energy_daily | ||
custom_card_more_power_outlet_time_sensor: sensor.time_immersion_heater_heating | ||
entity: switch.immersion_heater | ||
name: Immersion Heater | ||
``` | ||
## Template code | ||
```yaml | ||
--- | ||
### Custom Card More Power Outlet ### | ||
custom_card_more_power_outlet: | ||
template: | ||
- "icon_info_bg" | ||
- "yellow" | ||
- "ulm_language_variables" | ||
variables: | ||
custom_card_more_power_outlet_power_sensor: | ||
custom_card_more_power_outlet_energy_sensor: | ||
custom_card_more_power_outlet_time_sensor: | ||
triggers_update: "all" | ||
label: |- | ||
[[[ | ||
if (entity.state === "on" && variables.custom_card_more_power_outlet_power_sensor !== null && variables.custom_card_more_power_outlet_energy_sensor !== null && variables.custom_card_more_power_outlet_time_sensor !== null) { | ||
if (states[variables.custom_card_more_power_outlet_time_sensor].state < 1){ | ||
return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh • " + (states[variables.custom_card_more_power_outlet_time_sensor].state * 100) + "Mins"; | ||
} else | ||
return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh • " + states[variables.custom_card_more_power_outlet_time_sensor].state + "Hrs"; | ||
} else if (entity.state === "on" && variables.custom_card_more_power_outlet_power_sensor !== null && variables.custom_card_more_power_outlet_energy_sensor !== null) { | ||
return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh"; | ||
} else if (entity.state === "on" && variables.custom_card_more_power_outlet_power_sensor !== null && variables.custom_card_more_power_outlet_time_sensor !== null) { | ||
if (states[variables.custom_card_more_power_outlet_time_sensor].state < 1){ | ||
return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + (states[variables.custom_card_more_power_outlet_time_sensor].state * 100) + "Mins"; | ||
} else | ||
return states[variables.custom_card_more_power_outlet_power_sensor].state + "W • " + states[variables.custom_card_more_power_outlet_time_sensor].state + "Hrs"; | ||
} else if (entity.state === "on" && variables.custom_card_more_power_outlet_energy_sensor !== null && variables.custom_card_more_power_outlet_time_sensor !== null) { | ||
if (states[variables.custom_card_more_power_outlet_time_sensor].state < 1){ | ||
return states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh • " + (states[variables.custom_card_more_power_outlet_time_sensor].state * 100) + "Mins"; | ||
} else | ||
return states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh • " + states[variables.custom_card_more_power_outlet_time_sensor].state + "Hrs"; | ||
} else if (entity.state === "on" && variables.custom_card_more_power_outlet_power_sensor !== null) { | ||
return states[variables.custom_card_more_power_outlet_power_sensor].state + "W"; | ||
} else if (entity.state === "on" && variables.custom_card_more_power_outlet_energy_sensor !== null) { | ||
return states[variables.custom_card_more_power_outlet_energy_sensor].state + "kWh"; | ||
} else if (entity.state === "on" && variables.custom_card_more_power_outlet_time_sensor !== null) { | ||
if (states[variables.custom_card_more_power_outlet_time_sensor].state < 1){ | ||
return (states[variables.custom_card_more_power_outlet_time_sensor].state * 100) + "Mins"; | ||
} else | ||
return states[variables.custom_card_more_power_outlet_time_sensor].state + "Hrs"; | ||
} else if (entity.state === "on") { | ||
return variables.ulm_on; | ||
} else if (entity.state === "off") { | ||
return variables.ulm_off; | ||
} else if (entity.state === "unavailable") { | ||
return variables.ulm_unavailable; | ||
} else { | ||
return entity.state; | ||
} | ||
]]] | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,51 @@ | ||
--- | ||
custom_card_nas: | ||
template: | ||
- "blue_no_state" | ||
tap_action: | ||
action: "more-info" | ||
template: | ||
- "blue" | ||
entity: "[[[ return variables.ulm_custom_card_nas_sensor; ]]]" | ||
show_icon: true | ||
show_label: true | ||
show_name: true | ||
icon: |- | ||
[[[ | ||
return "mdi:nas"; | ||
]]] | ||
label: |- | ||
[[[ | ||
if (states[variables.ulm_custom_card_nas_sensor].state == 'on'){ | ||
var state = variables.ulm_custom_card_nas_text + states[variables.ulm_custom_card_nas_sensor].state + variables.ulm_custom_card_nas_unit; | ||
} else { | ||
var state = "Off"; | ||
} | ||
return state; | ||
return variables.ulm_custom_card_nas_text + " " + states[variables.ulm_custom_card_nas_sensor].state + variables.ulm_custom_card_nas_unit; | ||
]]] | ||
name: |- | ||
[[[ | ||
return "Nas"; | ||
]]] | ||
size: "20px" | ||
styles: | ||
label: | ||
- justify-self: "start" | ||
- align-self: "start" | ||
- font-weight: "bolder" | ||
- font-size: "12px" | ||
- filter: "opacity(40%)" | ||
- margin-left: "12px" | ||
name: | ||
- align-self: "end" | ||
- justify-self: "start" | ||
- font-weight: "bold" | ||
- font-size: "14px" | ||
- margin-left: "12px" | ||
- filter: "opacity(100%)" | ||
img_cell: | ||
- border-radius: "50%" | ||
- place-self: "center" | ||
- width: "42px" | ||
- height: "42px" | ||
grid: | ||
- grid-template-areas: "'i n' 'i l'" | ||
- grid-template-columns: "min-content auto" | ||
- grid-template-rows: "min-content min-content" | ||
card: | ||
- border-radius: "20px" | ||
- box-shadow: "var(--box-shadow)" | ||
- padding: "12px" |
Oops, something went wrong.