Created
August 21, 2018 12:54
-
-
Save VirtualL/bf423abe0937a58cb78a6c60d7e0eefb to your computer and use it in GitHub Desktop.
Hebrew Home Assistant Card for Xiaomi Vacuum Cleaner Based on https://sharethelove.io/picture-elements-cards/xiaomi-vacuum-card
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
########### More info at https://sharethelove.io/picture-elements-cards/xiaomi-vacuum-card | |
###########Change 'vacuum.xiaomi_vacuum' on the states for your robots name in the template sensors and elements!!! | |
########### ui-lovelace.yaml: | |
- type: picture-elements | |
image: /local/MyEntities/vacuum_card.jpg | |
elements: | |
- type: state-icon | |
tap_action: more-info | |
entity: vacuum.xiaomi_vacuum | |
title: מידע נוסף | |
icon: mdi:robot-vacuum | |
style: | |
top: 10% | |
left: 10% | |
- type: state-label | |
entity: sensor.vacuum_status | |
style: | |
top: 10% | |
right: 5% | |
color: rgb(255, 255, 255) | |
transform: translate(0%,-50%) | |
pointer-events: none | |
text-shadow: 1px 1px black | |
font-family: Trebuchet MS | |
font-size: 90% | |
font-weight: bold | |
border-right-style: solid | |
border-color: rgb(34, 154, 210) | |
background-color: rgb(54, 65, 78) | |
opacity: 0.8 | |
- type: state-label | |
entity: sensor.vacuum_battery | |
style: | |
top: 40% | |
right: 5% | |
color: rgb(255, 255, 255) | |
transform: translate(0%,-50%) | |
pointer-events: none | |
text-shadow: 1px 1px black | |
font-family: Trebuchet MS | |
font-size: 90% | |
font-weight: bold | |
border-right-style: solid | |
border-color: rgb(34, 154, 210) | |
background-color: rgb(54, 65, 78) | |
opacity: 0.8 | |
- type: icon | |
title: בצע ניקיון נקודתי | |
icon: mdi:camera-metering-spot | |
tap_action: call-service | |
entity: vacuum.xiaomi_vacuum | |
service: vacuum.clean_spot | |
style: | |
top: 80% | |
left: 80% | |
- type: icon | |
title: חזור לעמדת הטענה | |
tap_action: call-service | |
icon: mdi:home | |
entity: vacuum.xiaomi_vacuum | |
service: vacuum.return_to_base | |
style: | |
top: 80% | |
left: 60% | |
- type: icon | |
title: התחל או השהה פעילות | |
icon: mdi:play-pause | |
tap_action: call-service | |
entity: vacuum.xiaomi_vacuum | |
service: vacuum.start_pause | |
style: | |
top: 80% | |
left: 40% | |
- type: icon | |
title: עצור שאיבה | |
icon: mdi:stop | |
tap_action: call-service | |
entity: vacuum.xiaomi_vacuum | |
service: vacuum.stop | |
style: | |
top: 80% | |
left: 20% | |
########### sensors.ymal: | |
####################################### SENSOR ####################################### | |
########### | |
- platform: template | |
sensors: | |
vacuum_status: | |
friendly_name: "Vacuum - Status" | |
# value_template: "{{ states.vacuum.xiaomi_vacuum.attributes.status }}:מצב" | |
value_template: >- | |
{%if states.vacuum.xiaomi_vacuum.attributes.status == 'Charging' %}מצב:בטעינה | |
{% elif states.vacuum.xiaomi_vacuum.attributes.status == 'Cleaning' %}מצב:מנקה | |
{% elif states.vacuum.xiaomi_vacuum.attributes.status == 'Spot cleaning' %}מצב:מנקה נקודתי | |
{% elif states.vacuum.xiaomi_vacuum.attributes.status == 'Returning home' %}מצב:בחזרה לבסיס | |
{% elif states.vacuum.xiaomi_vacuum.attributes.status == 'Paused' %}מצב:בהשהייה | |
{% elif states.vacuum.xiaomi_vacuum.attributes.status == 'Idle' %}מצב:לא פעיל | |
{% elif states.vacuum.xiaomi_vacuum.attributes.status == 'Error' %}מצב:שגיאה,בדוק מה הסיבה באפליקציה | |
{% elif states.vacuum.xiaomi_vacuum.attributes.status == 'Charger disconnected' %}מצב:מטען מנותק | |
{%- else -%} | |
{{states.vacuum.xiaomi_vacuum.attributes.status}}:מצב | |
{% endif %} | |
- platform: template | |
sensors: | |
vacuum_battery: | |
friendly_name: "Vacuum - Battery" | |
value_template: "{{ states.vacuum.xiaomi_vacuum.attributes.battery_level }}%:סוללה" | |
device_class: battery | |
# unit_of_measurement: '%' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment