Skip to content

Instantly share code, notes, and snippets.

@IronButterfly
Last active March 26, 2022 12:13
Show Gist options
  • Save IronButterfly/c6ac886fe940ba1815f686165938255f to your computer and use it in GitHub Desktop.
Save IronButterfly/c6ac886fe940ba1815f686165938255f to your computer and use it in GitHub Desktop.
Mobile interface of my HomeAssistant
title: My Sweet Home
kiosk_mode:
mobile_settings:
hide_header: true
swipe_nav:
wrap: false
animate: swipe
prevent_default: true
swipe_amount: 15
views:
- title: Главная
id: main
icon: mdi:home-assistant
cards:
- type: vertical-stack
cards:
- type: custom:simple-weather-card
entity: weather.openweathermap
name: Новосибирск
custom:
- temp: sensor.narodmon_temperature
- humidity: sensor.narodmon_humidity
- type: glance
entities:
- entity: person.pi
state_color: true
name: Игорь
- entity: person.natasha
name: Наташа
- entity: person.jane
name: Женя
- entity: person.family
name: Есть кто?
- type: grid
title: Зал
columns: 4
square: false
cards:
- type: 'custom:button-card'
entity: switch.switch_hall_switch_left
name: Левый
icon: mdi:ceiling-light
template: light_button
- type: 'custom:button-card'
entity: switch.switch_hall_switch_right
name: Правый
icon: mdi:ceiling-light
template: light_button
- type: 'custom:button-card'
entity: light.0x00124b000a9df11f_light
name: Лампа
icon: mdi:lamp
template: light_button
- type: 'custom:button-card'
entity: switch.outlet_hall_switch
name: Увлажнитель
icon: mdi:air-humidifier
template: light_button
- type: 'custom:button-card'
entity: light.koogeek_ls1
name: Подсветка
icon: mdi:led-strip-variant
template: light_button
- type: 'custom:button-card'
entity: binary_sensor.window_hall_contact
name: Окно
icon: mdi:window-open-variant
template: light_button_sensor
- type: grid
title: Кухня
columns: 4
square: false
cards:
- type: 'custom:button-card'
entity: switch.switch_kitchen_switch_left
name: Левый
icon: mdi:ceiling-light
template: light_button
- type: 'custom:button-card'
entity: switch.switch_kitchen_switch_right
name: Правый
icon: mdi:ceiling-light
template: light_button
- type: 'custom:button-card'
entity: light.led_strip
name: Лента
icon: mdi:led-strip-variant
template: light_button
- type: 'custom:button-card'
entity: switch.relay_switch_l1
name: Стол
icon: mdi:wall-sconce-flat
template: light_button
- type: 'custom:button-card'
entity: switch.relay_switch_l2
name: Потолок
icon: mdi:wall-sconce-flat
template: light_button
- type: 'custom:button-card'
entity: input_boolean.ny
name: Эффект
template: light_button
- type: 'custom:button-card'
entity: binary_sensor.door_balcon_contact
name: Балконая
template: light_button_sensor
- type: 'custom:button-card'
entity: binary_sensor.kitchen_motion_group
name: Кухня
template: light_button_sensor
- type: grid
title: Коридор
columns: 4
square: false
cards:
- type: 'custom:button-card'
entity: switch.switch_wardrobe_switch
name: Гардероб
icon: mdi:ceiling-light
template: light_button
- type: 'custom:button-card'
entity: switch.switch_entrance_switch
name: Коридор
icon: mdi:ceiling-light
template: light_button
- type: 'custom:button-card'
entity: switch.switch_bath_switch
name: Ванная
icon: mdi:ceiling-light
template: light_button
- type: 'custom:button-card'
entity: binary_sensor.door_bathroom_contact
name: Ванная
template: light_button_sensor
- type: 'custom:button-card'
entity: binary_sensor.door_entrance_contact
name: Входная
template: light_button_sensor
- type: 'custom:button-card'
entity: binary_sensor.door_wardrobe_contact
name: Гардероб
template: light_button_sensor
- type: 'custom:button-card'
entity: binary_sensor.corridor_motion_group
name: Коридор
template: light_button_sensor
- type: 'custom:button-card'
entity: binary_sensor.water_leak_water_leak
name: Протечка
template: light_button_sensor
- type: grid
title: Спальня
columns: 4
square: false
cards:
- type: 'custom:button-card'
entity: switch.outlet_rozetka_switch
name: Лампа
icon: mdi:desk-lamp
template: light_button
- type: 'custom:button-card'
entity: switch.switch_bedroom_switch_left
name: Левый
icon: mdi:ceiling-light
template: light_button
- type: 'custom:button-card'
entity: switch.switch_bedroom_switch_right
name: Правый
icon: mdi:ceiling-light
template: light_button
- type: grid
columns: 2
cards:
- type: thermostat
name: Спальня
entity: climate.ai_bedroom
- type: thermostat
name: Кухня
entity: climate.ai_kitchen
- title: Датчики
id: sensors
icon: mdi:motion-sensor
cards:
- type: vertical-stack
cards:
- type: picture-elements
image: /local/images/plant3.png
elements:
- type: state-badge
entity: sensor.miflora_moisture
style:
top: 73%
left: 10%
color: transparent
--ha-label-badge-font-size: 1.3em
- type: state-badge
entity: sensor.miflora_temperature
style:
top: 73%
left: 25%
color: transparent
--ha-label-badge-font-size: 1.3em
- type: state-badge
entity: sensor.miflora_soil_conductivity
style:
top: 77%
left: 40%
color: transparent
--ha-label-badge-font-size: 1.3em
- type: state-badge
entity: sensor.miflora_illuminance
style:
top: 73%
left: 55%
color: transparent
--ha-label-badge-font-size: 1.3em
- type: state-badge
entity: sensor.flower_zigbee_soil_moisture
style:
top: 73%
left: 75%
color: transparent
--ha-label-badge-font-size: 1.3em
- type: state-badge
entity: sensor.flower_zigbee_temperature_ds
style:
top: 73%
left: 90%
color: transparent
--ha-label-badge-font-size: 1.3em
- type: custom:text-element
text: "Фикус кухня"
style:
top: 12%
left: 32%
- type: custom:text-element
text: "Фикус зал"
style:
top: 12%
left: 82%
- type: grid
columns: 2
square: false
cards:
- type: custom:mini-graph-card
name: Температура
unit: 'С°'
entities:
- entity: sensor.conditions_hall_temperature
name: Зал
color: green
- entity: sensor.conditions_kitchen_temperature
name: Кухня
- entity: sensor.conditions_bedroom_temperature
name: Спальня
hours_to_show: 48
points_per_hour: 1
- type: custom:mini-graph-card
entities:
- sensor.airqmon_co2_co2
name: Концентрация
color_thresholds:
- value: 400
color: "#4bf01f" #зеленый
- value: 800
color: "#d37b00" #оранжевый
- value: 1000
color: "#c0392b" #красный
icon: mdi:molecule-co2
show:
labels: true
hours_to_show: 48
points_per_hour: 1
- type: custom:mini-graph-card
name: Влажность
unit: '%'
entities:
- entity: sensor.conditions_hall_humidity
name: Зал
color: green
- entity: sensor.conditions_kitchen_humidity
name: Кухня
- entity: sensor.conditions_bedroom_humidity
name: Спальня
hours_to_show: 48
points_per_hour: 1
- type: custom:mini-graph-card
entities:
- sensor.conditions_pressure_mmhg
name: Давление
color_thresholds:
- value: 1013
color: "#4bf01f" #зеленый
- value: 980
color: "#5586fa" #синий
- value: 1100
color: "#c0392b" #красный
show:
# graph: bar
labels: true
hours_to_show: 48
points_per_hour: 1
- type: custom:apexcharts-card
graph_span: 1d
all_series_config:
stroke_width: 3
curve: smooth
extend_to_end: false
show:
# legend_value: false
extremas: true
now:
show: true
color: red
label: Now
span:
start: day
header:
show: true
show_states: true
colorize_states: true
apex_config:
chart:
height: 'auto'
tooltip:
enabled: true
grid:
show: false
fill:
type: gradient
gradient:
type: vertical
shadeIntensity: 0.8
inverseColors: false
opacityFrom: 0.5
opacityTo: 0
stops:
- [0, 50, 100]
xaxis:
axisBorder:
show: false
labels:
style:
fontSize: 14px
fontFamily: Raleway
yaxis:
- show: true
decimalsInFloat: 0
min: 22
max: 27
labels:
style:
fontSize: 12px
fontWeight: bold
fontFamily: Raleway
forceNiceScale: true
legend:
show: false
# fontSize: 12px
# fontFamily: Raleway
# height: 40
dataLabels:
enabled: false
series:
- entity: sensor.mean_temperature
type: area
name: Средняя температура
# color: '#4bf01f'
fill_raw: last
float_precision: 1
group_by:
duration: 60min
func: avg
- entity: sensor.mean_temperature
name: Средняя температура вчера
type: area
color: grey
fill_raw: last
float_precision: 1
group_by:
duration: 60min
func: avg
offset: -1d
- type: 'custom:apexcharts-card'
header:
title: Зал
show: true
show_states: true
colorize_states: true
update_interval: 10min
graph_span: 3d
experimental:
brush: true
apex_config:
tooltip:
enabled: true
yaxis:
- show: true
decimalsInFloat: 0
min: 18
max: 30
labels:
style:
colors: '#c0392b'
fontSize: 12px
fontWeight: bold
fontFamily: Raleway
forceNiceScale: true
- show: true
decimalsInFloat: 0
min: 30
max: 70
opposite: true
labels:
style:
colors: '#5586fa'
fontSize: 12px
fontWeight: bold
fontFamily: Raleway
forceNiceScale: true
xaxis:
axisBorder:
show: false
labels:
style:
fontSize: 14px
fontFamily: Raleway
chart:
height: 'auto'
grid:
show: false
legend:
show: false
dataLabels:
enabled: false
stroke:
width: 3
curve: smooth
fill:
type: gradient
gradient:
type: vertical
shadeIntensity: 0.8
inverseColors: false
opacityFrom: 0.5
opacityTo: 0
stops:
- [0, 50, 100]
series:
- entity: sensor.conditions_hall_temperature
name: Температура
show:
extremas: true
in_brush: true
in_chart: true
type: area
color: '#c0392b'
fill_raw: last
float_precision: 1
group_by:
duration: 30min
func: avg
- entity: sensor.conditions_hall_humidity
name: Влажность
type: area
color: '#5586fa'
fill_raw: last
float_precision: 1
group_by:
duration: 30min
func: avg
show:
in_brush: true
in_chart: true
- type: entities
title: Айфон Игоря
show_header_toggle: false
entities:
- sensor.iphoneig_connection_type
- sensor.iphoneig_distance
- sensor.iphoneig_floors_ascended
- sensor.iphoneig_floors_descended
- sensor.iphoneig_geocoded_location
- sensor.iphoneig_steps
- type: entities
title: Айфон Наташи
show_header_toggle: false
entities:
- sensor.iphone_natasha_connection_type
- sensor.iphone_natasha_distance
- sensor.iphone_natasha_floors_ascended
- sensor.iphone_natasha_floors_descended
- sensor.iphone_natasha_geocoded_location
- sensor.iphone_natasha_steps
- type: entities
title: Сертификат
show_header_toggle: false
entities:
- sensor.cert_expiry_timestamp_ha_pavuk_su_3988
- title: Сервер
id: server
icon: mdi:server
cards:
- type: vertical-stack
cards:
- type: glance
show_name: false
entities:
- entity: sensor.last_boot_custom
- entity: sensor.online_custom
icon: mdi:home-assistant
- entity: binary_sensor.internet_is_available
- entity: sensor.home_assistant_v2_db
icon: mdi:database
- type: 'custom:apexcharts-card'
header:
show: true
show_states: true
colorize_states: true
update_interval: 10min
graph_span: 1d
apex_config:
tooltip:
enabled: true
yaxis:
- show: true
color: '#c0392b'
decimalsInFloat: 0
labels:
style:
fontSize: 12px
fontWeight: bold
fontFamily: Raleway
forceNiceScale: true
xaxis:
axisBorder:
show: false
labels:
style:
fontSize: 14px
fontFamily: Raleway
chart:
height: 'auto'
grid:
show: false
legend:
fontSize: 12px
fontFamily: Raleway
height: 40
dataLabels:
enabled: false
stroke:
width: 2
curve: smooth
fill:
type: gradient
gradient:
type: vertical
shadeIntensity: 0.8
inverseColors: false
opacityFrom: 0.5
opacityTo: 0
stops:
- [0, 50, 100]
series:
- entity: sensor.cpu_temperature
name: CPU Temp
show:
extremas: true
type: area
color: '#c0392b'
fill_raw: last
float_precision: 1
group_by:
duration: 20min
func: avg
- type: custom:apexcharts-card
chart_type: radialBar
series:
- entity: sensor.memory_use_percent
name: Memory use
- entity: sensor.disk_use_percent_home
name: Disk use
- entity: sensor.processor_use
name: CPU use
apex_config:
plotOptions:
radialBar:
offsetY: 0
startAngle: 0
endAngle: 270
hollow:
margin: 5,
size: '30%'
background: 'transparent'
dataLabels:
name:
show: false
value:
show: false
chart:
height: 100
legend:
show: true
floating: true
fontSize: '16px'
position: 'left'
offsetX: 0 # change this to move the legend left of right
offsetY: 25 # change this to move the legend up or down
labels:
useSeriesColors: true
markers:
size: 0
itemMargin:
vertical: 3
- type: custom:auto-entities
show_empty: true
card:
type: entities
show_header_toggle: false
filter:
include:
- entity_id: sensor.*battery*
exclude:
- state: '> 65.0'
- entity_id: sensor.*natasha_battery*
- entity_id: sensor.macbookpro_internal_battery_state
- entity_id: sensor.mi_band_battery_level
card_mod:
style: |
ha-card {
background: transparent;
box-shadow: none;
}
sort:
method: last_changed
numeric: false
reverse: true
- title: Счетчики воды
id: counters
icon: mdi:water-pump
cards:
- type: vertical-stack
cards:
- type: entities # Фильтры воды
title: Фильтр воды
show_header_toggle: false
entities:
- sensor.drink_water_daily_single
- type: divider
- sensor.drink_water_yesterday
- type: divider
- sensor.drink_water_monthly_single
- type: divider
- sensor.drink_water_yearly_single
- type: entities
title: Контроль счетчика воды
show_header_toggle: false
entities:
- sensor.drink_water_drink_filter
- switch.restart_drink_filter
- binary_sensor.state_drink_filter
- sensor.status_drink_filter
- sensor.uptime_drink_filter_new
# - type: 'custom:simple-thermostat'
# name: Conditioner
# entity: climate.conder
# layout:
# step: row
# hide:
# state: true
# header: false
# sensors:
# - entity: sensor.conder_fan_speed
# name: Скорость
# # - entity: sensor.conder_swing
# # name: Направление
# # - entity: sensor.conder_mode
# # name: Режим
# control:
# hvac:
# _name: Режимы
# auto:
# name: false
# heat:
# name: false
# cool:
# name: false
# dry:
# name: false
# fan_only:
# name: false
# 'off':
# name: false
# swing:
# _name: Шторки
# ud:
# icon: mdi:arrow-up-down
# name: false
# lr:
# icon: mdi:arrow-left-right
# name: false
# all:
# icon: mdi:arrow-expand-all
# name: false
# 'off':
# name: false
# - type: entities
# show_header_toggle: false
# entities:
# - entity: switch.conder_health
# name: Health mode
# state_color: true
# secondary_info: last-changed
# - entity: switch.conder_quiet
# name: Quiet mode
# state_color: true
# secondary_info: last-changed
- title: Медиа
id: media
icon: mdi:cast-audio
cards:
- type: vertical-stack
cards:
- type: custom:mini-media-player
artwork: full-cover
entity: media_player.yandex_station_ff98f029756a5be40f7fb0ad
shortcuts:
attribute: sound_mode
buttons:
- icon: 'mdi:account-voice'
id: Произнеси текст
type: sound_mode
- icon: 'mdi:google-assistant'
id: Выполни команду
type: sound_mode
- icon: 'mdi:playlist-star'
id: включи мою любимую музыку вперемешку
type: command
- icon: 'mdi:playlist-music'
id: включи плейлист дня
type: command
- icon: 'mdi:heart'
id: лайк
type: command
- icon: 'mdi:radio-fm'
id: включи Вести ФМ
type: command
columns: 6
hide:
power: true
tts:
platform: yandex_station
- type: custom:mini-media-player
artwork: full-cover
entity: media_player.yandex_station_ff98f01063d0be449e1fb398
shortcuts:
attribute: sound_mode
buttons:
- icon: 'mdi:account-voice'
id: Произнеси текст
type: sound_mode
- icon: 'mdi:google-assistant'
id: Выполни команду
type: sound_mode
- icon: 'mdi:playlist-star'
id: включи мою любимую музыку вперемешку
type: command
- icon: 'mdi:playlist-music'
id: включи плейлист дня
type: command
- icon: 'mdi:heart'
id: лайк
type: command
- icon: 'mdi:radio-fm'
id: включи Вести ФМ
type: command
columns: 6
hide:
power: true
tts:
platform: yandex_station
- type: media-control
entity: media_player.lgtv
- type: media-control
entity: media_player.samsungtv
- title: Vacuum
icon: mdi:robot-vacuum
cards:
- type: 'custom:vacuum-card'
entity: vacuum.casper
actions:
start:
service: xiaomi_vacuum.vacuum_clean_room_by_id
service_data:
entity_id: vacuum.casper
rooms: [[ 'A' ], [ 'C' ], [ 'D' ]]
repeats: 1
clean_mode: 2
mop_mode: 2
stats:
default:
- attribute: filter_time_left
unit: часов
subtitle: Фильтр
- attribute: side_brush_time_left
unit: часов
subtitle: Боковая щетка
- attribute: main_brush_time_left
unit: часов
subtitle: Главная щетка
- attribute: waterbox
subtitle: Бак для воды
cleaning:
- attribute: cleaning_area
unit: m2
subtitle: Площадь уборки
- attribute: cleaning_time
unit: minutes
subtitle: Время уборки
shortcuts:
- name: Уборка гостинной
icon: 'mdi:sofa'
service: xiaomi_vacuum.vacuum_clean_room_by_id
service_data:
entity_id: vacuum.casper
rooms:
- C
repeats: 1
clean_mode: 1
mop_mode: 2
- name: Уборка кухни
icon: 'mdi:silverware-fork-knife'
service: xiaomi_vacuum.vacuum_clean_room_by_id
service_data:
entity_id: vacuum.casper
rooms:
- A
repeats: 1
clean_mode: 1
mop_mode: 2
- name: Уборка спальни
icon: 'mdi:bed'
service: xiaomi_vacuum.vacuum_clean_room_by_id
service_data:
entity_id: vacuum.casper
rooms:
- A
repeats: 1
clean_mode: 1
mop_mode: 2
- name: Уборка коридора
icon: 'mdi:shoe-sneaker'
service: xiaomi_vacuum.vacuum_clean_room_by_id
service_data:
entity_id: vacuum.casper
rooms:
- D
repeats: 1
clean_mode: 1
mop_mode: 2
button_card_templates:
light_button:
hold_action:
action: more-info
label: |-
[[[ if (entity.state !='unavailable'){
if (entity.state =='off'){
var bri = Math.round(entity.attributes.brightness / 2.55);
return 'Off';
}else{
var bri = Math.round(entity.attributes.brightness / 2.55);
return (bri ? bri + '%' : 'On') ;
}
}else{
return "Indisponible";
}
]]]
layout: icon_label
show_label: true
show_name: true
state:
- styles:
card:
- box-shadow: '0px 0px 10px 3px var(--box_shadow-color)'
icon:
- color: #1872F2
value: 'on'
styles:
card:
- width: 103px
- height: 88px
- border-radius: 15px
- margin: 5px 5px 0px 0px
- padding: 0px 0px
- '--paper-card-background-color': 'rgba(40, 40, 40, 0.7)'
- '--box_shadow-color': |-
[[[
var color = entity.attributes.rgb_color;
if (color){
return 'rgba(' + entity.attributes.rgb_color + ',1)'
}
else{
return '#1872F2'
}
]]]
grid:
- grid-template-rows: 42px auto 0px
- grid-template-columns: 42px auto
icon:
- width: 30px
- color: white
label:
- font-size: 12px
- font-weight: bold
- color: white
name:
- justify-self: start
- align-self: end
- padding: 9px 10px
- font-size: 11px
- font-weight: bold
- color: white
tap_action:
action: toggle
light_button_sensor:
hold_action:
action: more-info
label: >
[[[ var bri = Math.round(entity.attributes.brightness / 2.55); if
(entity.state === 'on') return (bri ? (bri+"%") : '') ]]]
layout: icon_label
show_label: true
show_name: true
state:
- styles:
card:
- box-shadow: '0px 0px 10px 3px #FC8607'
icon:
- color: '#FC8607'
value: 'on'
styles:
card:
- width: 103px
- height: 88px
- border-radius: 15px
- margin: 5px 5px 0px 0px
- padding: 0px 0px
- '--paper-card-background-color': 'rgba(40, 40, 40, 0.7)'
grid:
- grid-template-rows: 42px auto 0px
- grid-template-columns: 42px auto
icon:
- width: 30px
- color: white
label:
- font-size: 12px
- font-weight: bold
- color: white
name:
- justify-self: start
- align-self: end
- padding: 9px 10px
- font-size: 12px
- font-weight: bold
- color: white
tap_action:
action: more-info
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment