-
Notifications
You must be signed in to change notification settings - Fork 430
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
129 additions
and
0 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
custom_cards/custom_card_yagrasdemonde_lights_count/languages/RU.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,9 @@ | ||
--- | ||
ulm_custom_card_yagrasdemonde_lights_count_language_variables: | ||
variables: | ||
ulm_custom_card_yagrasdemonde_lights_count_light_0: "Свет отключен" | ||
ulm_custom_card_yagrasdemonde_lights_count_light_1: "1 лампа включена" | ||
ulm_custom_card_yagrasdemonde_lights_count_light_many: "лампы включены" | ||
ulm_custom_card_yagrasdemonde_lights_count_cover_0: "Нет открытых ворот" | ||
ulm_custom_card_yagrasdemonde_lights_count_cover_1: "1 ворота открыты" | ||
ulm_custom_card_yagrasdemonde_lights_count_cover_many: "ворот открыты" |
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,85 @@ | ||
# Custom-chip `Tesla Temperature` | ||
|
||
![example-image](../../docs/assets/img/custom_chip_tesla_temperature.png) | ||
|
||
## Information | ||
|
||
Custom-chip `Tesla Temperature` is a chip showing the status of set temperature and current inside temperature. | ||
|
||
## Changelog | ||
|
||
<details> | ||
<summary>1.0.0</summary> | ||
Initial release | ||
</details> | ||
|
||
## Usage | ||
|
||
```yaml | ||
- type: "custom:button-card" | ||
template: custom_chip_tesla_temperature | ||
variables: | ||
ulm_chip_hvac: climate.tesla_hvac_climate_system | ||
``` | ||
## Requirements | ||
[UI Lovelace Minimalist](https://github.com/UI-Lovelace-Minimalist/UI) | ||
[Tesla Custom Integration](https://github.com/alandtse/tesla) | ||
## Variables | ||
<table> | ||
<tr> | ||
<th>Variable</th> | ||
<th>Default</th> | ||
<th>Required</th> | ||
<th>Explanation</th> | ||
</tr> | ||
<tr> | ||
<td>ulm_chip_hvac</td> | ||
<td></td> | ||
<td>Yes</td> | ||
<td>Tesla hvac entity</td> | ||
</tr> | ||
</table> | ||
## Template code | ||
```yaml | ||
--- | ||
custom_chip_tesla_temperature: | ||
template: | ||
- "chip_icon_label" | ||
- "ulm_translation_engine" | ||
variables: | ||
ulm_card_enable_popup: false | ||
triggers_update: "all" | ||
label: | | ||
[[[ | ||
function convertTemperature(temp) { | ||
if (parseFloat(temp) == temp && Math.floor(temp) != temp) { | ||
return parseFloat(temp).toFixed(1); | ||
} | ||
return temp; | ||
} | ||
var set_temp = states[variables.ulm_chip_hvac].attributes.temperature; | ||
var inside_temp = states[variables.ulm_chip_hvac].attributes.current_temperature; | ||
var label = "Set " + convertTemperature(set_temp) + "°" + " / Current " + convertTemperature(inside_temp) + "°"; | ||
return label; | ||
]]] | ||
icon: | | ||
[[[ | ||
var preset = states[variables.ulm_chip_hvac].attributes.preset_mode.toLowerCase(); | ||
var icon = { | ||
"normal": "mdi:thermometer", | ||
"defrost": "mdi:snowflake-melt", | ||
"keep on": "mdi:heat-wave", | ||
"dog mode": "mdi:dog-side", | ||
"camp mode": "mdi:campfire", | ||
"default": "mdi:thermometer" | ||
} | ||
return (icon[preset] || icon["default"]); | ||
]]] | ||
``` |
35 changes: 35 additions & 0 deletions
35
custom_cards/custom_chip_tesla_temperature/custom_chip_tesla_temperature.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,35 @@ | ||
--- | ||
custom_chip_tesla_temperature: | ||
template: | ||
- "chip_icon_label" | ||
- "ulm_translation_engine" | ||
variables: | ||
ulm_card_enable_popup: false | ||
triggers_update: "all" | ||
label: | | ||
[[[ | ||
function convertTemperature(temp) { | ||
if (parseFloat(temp) == temp && Math.floor(temp) != temp) { | ||
return parseFloat(temp).toFixed(1); | ||
} | ||
return temp; | ||
} | ||
var set_temp = states[variables.ulm_chip_hvac].attributes.temperature; | ||
var inside_temp = states[variables.ulm_chip_hvac].attributes.current_temperature; | ||
var label = "Set " + convertTemperature(set_temp) + "°" + " / Current " + convertTemperature(inside_temp) + "°"; | ||
return label; | ||
]]] | ||
icon: | | ||
[[[ | ||
var preset = states[variables.ulm_chip_hvac].attributes.preset_mode; | ||
var icon = { | ||
"Normal": "mdi:thermometer", | ||
"Defrost": "mdi:snowflake-melt", | ||
"Keep On": "mdi:heat-wave", | ||
"Dog Mode": "mdi:dog-side", | ||
"Camp Mode": "mdi:campfire", | ||
"default": "mdi:thermometer" | ||
} | ||
return (icon[preset] || icon["default"]); | ||
]]] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.