Skip to content

Instantly share code, notes, and snippets.

@vavsab
Last active October 16, 2023 20:10
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vavsab/3802b4bd9cb7db4cbccde597d5130a1f to your computer and use it in GitHub Desktop.
Save vavsab/3802b4bd9cb7db4cbccde597d5130a1f to your computer and use it in GitHub Desktop.
Home Assistant - Smart MAC пример конфигурации для https://support.smart-mac.com/uk/communities/1/topics/174-home-assistant
title: Lucky Home
views:
# View tab title.
- title: Example
cards:
- type: vertical-stack
cards:
- type: markdown
content: >
**Текущее состояние**
- type: entities
show_header_toggle: false
entities:
- entity: sensor.time
name: Текущее время
icon: mdi:clock-outline
- entity: sensor.date
name: Дата
icon: mdi:calendar-check-outline
- type: vertical-stack
cards:
- type: markdown
content: >
**Электроэнергия**
#напряжение
- type: horizontal-stack
cards:
- type: gauge
name: Фаза 1
unit: 'V'
entity: sensor.faze1
severity:
yellow: 60
green: 220
red: 246
- type: gauge
name: Фаза 2
unit: 'V'
entity: sensor.faze2
severity:
yellow: 60
green: 220
red: 246
- type: gauge
name: Фаза 3
unit: 'V'
entity: sensor.faze3
severity:
yellow: 60
green: 220
red: 246
#Амперы
- type: horizontal-stack
cards:
- type: gauge
name: ТОК 1
unit: 'A'
entity: sensor.amper1
severity:
green: 1
yellow: 8
red: 25
- type: gauge
name: ТОК 2
unit: 'A'
entity: sensor.amper2
severity:
green: 1
yellow: 8
red: 25
- type: gauge
name: ТОК 3
unit: 'A'
entity: sensor.amper3
severity:
green: 1
yellow: 8
red: 25
#КВатты
- type: horizontal-stack
cards:
- type: gauge
name: Нагрузка 1
unit: 'кВт'
entity: sensor.kw1
severity:
green: 1
yellow: 8
red: 25
- type: gauge
name: Нагрузка 2
unit: 'кВт'
entity: sensor.kw2
severity:
green: 1
yellow: 8
red: 25
- type: gauge
name: Нагрузка 3
unit: 'кВт'
entity: sensor.kw3
severity:
green: 1
yellow: 8
red: 25
- type: horizontal-stack
cards:
- type: gauge
name: Нагрузка по всем фазам
unit: 'кВт'
entity: sensor.kwall
severity:
green: 1
yellow: 8
red: 25
- entity: sensor.kwatttotall
type: custom:multiple-entity-row
name: общее потребление
icon: mdi:current-ac
secondary_info: false
state_header: общее
entities:
- entity: sensor.kwatt1
name: кВт1
- entity: sensor.kwatt2
name: кВт2
- entity: sensor.kwatt3
name: кВт3
lovelace:
resources:
- url: /hacsfiles/lovelace-multiple-entity-row/multiple-entity-row.js
type: module
mode: yaml
# Add yaml dashboards
dashboards:
lovelace-yaml:
mode: yaml
title: YAML # Тут можно вставить свое название
icon: mdi:script
show_in_sidebar: true
filename: lovelace.yaml
sensor:
- platform: mqtt
name: faze1
state_topic: 1728054586.V1
- platform: mqtt
name: faze2
state_topic: 1728054586.V2
- platform: mqtt
name: faze3
state_topic: 1728054586.V3
- platform: mqtt
name: AMPER1
state_topic: 1728054586.A1
- platform: mqtt
name: AMPER2
state_topic: 1728054586.A2
- platform: mqtt
name: AMPER3
state_topic: 1728054586.A3
- platform: mqtt
name: KWATT1
state_topic: 1728054586.KWh1
- platform: mqtt
name: KWATT2
state_topic: 1728054586.KWh2
- platform: mqtt
name: KWATT3
state_topic: 1728054586.KWh3
- platform: mqtt
name: PF1
state_topic: 1728054586.PF1
- platform: mqtt
name: PF2
state_topic: 1728054586.PF2
- platform: mqtt
name: PF3
state_topic: 1728054586.PF3
- platform: template
sensors:
kwatttotall:
friendly_name: "energy kWh (total)"
unit_of_measurement: 'кВт'
value_template: "{{ (states('sensor.kwatt1') |float + states('sensor.kwatt2') |float + states('sensor.kwatt3') | float) | round(1) }}"
kw1:
friendly_name: "потреблениеФ1"
unit_of_measurement: 'кВт'
value_template: "{{ (states('sensor.faze1') | float * states('sensor.amper1') | float /1000 * states('sensor.pf1') | float) | round(1) }}"
kw2:
friendly_name: "потреблениеФ2"
unit_of_measurement: 'кВт'
value_template: "{{ (states('sensor.faze2') | float * states('sensor.amper2') | float /1000 * states('sensor.pf2') | float) | round(1) }}"
kw3:
friendly_name: "потреблениеФ3"
unit_of_measurement: 'кВт'
value_template: "{{ (states('sensor.faze3') | float * states('sensor.amper3') | float /1000 * states('sensor.pf3') | float) | round(1) }}"
kwall:
friendly_name: "потребление общее"
unit_of_measurement: 'кВт'
value_template: "{{ (states('sensor.kw1') | float + states('sensor.kw2') | float + states('sensor.kw3') | float) | round(0) }}"
@vavsab
Copy link
Author

vavsab commented May 6, 2021

На выходе получается что-то подобное
image

@gaszodi
Copy link

gaszodi commented Oct 15, 2023

Hi!
My problem is this:
kép
The entities are not available!
Could you tell me what's wrong? (Можете ли вы сказать мне, что случилось?)
Thanks!
Gabor

@gaszodi
Copy link

gaszodi commented Oct 15, 2023

kép

@gaszodi
Copy link

gaszodi commented Oct 16, 2023

I've solved! I've used the old method of parametering MQTT. Attention! The described method is old and out of use!
https://community.home-assistant.io/t/enphase-envoy-with-energy-dashboard/328668/604

@vavsab
Copy link
Author

vavsab commented Oct 16, 2023

Good job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment