Skip to content

Commit

Permalink
Add latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeeq committed Apr 27, 2024
1 parent 515a612 commit c0a3a82
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 40 deletions.
62 changes: 53 additions & 9 deletions playbooks/vms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# hosts: clevo
# become: true
# tasks:
<<<<<<< Updated upstream
# - name: Upgrade all packages
# ansible.builtin.dnf:
# name: "*"
Expand All @@ -34,16 +35,47 @@
# ansible.builtin.import_playbook: generic-core.yml
# vars:
# hosts_to_deploy: vms
=======
# - name: Clean DNF
# shell: dnf clean all

- name: Provision DNS1
hosts:
- dns1
become: true
roles:
- servers/network-static-dns
- apps/docker
- servers/apps/coredns
- servers/apps/letsencrypt-coredns
# - name: Upgrade all packages
# ansible.builtin.dnf:
# name: "*"
# state: latest
# update_cache: true

# - name: Check if reboot required
# stat:
# path: /var/run/reboot-required
# register: reboot_required_file

# # TODO: Fix reboot on Clevo
# - name: Reboot if required
# reboot:
# when:
# - reboot_required_file.stat.exists == true
# - inventory_hostname != "mikeeClevo"

# - name: Autoremove unneeded packages installed as dependencies
# ansible.builtin.dnf:
# autoremove: yes
>>>>>>> Stashed changes

# - name: Set variables on an imported playbook
# ansible.builtin.import_playbook: generic-core.yml
# vars:
# hosts_to_deploy: vms

# - name: Provision DNS1
# hosts:
# - dns1
# become: true
# roles:
# - servers/network-static-dns
# - apps/docker
# - servers/apps/coredns
# - servers/apps/letsencrypt-coredns

- name: Provision DNS2
hosts:
Expand All @@ -54,6 +86,7 @@
- apps/docker
- servers/apps/adguard-home

<<<<<<< Updated upstream
# - name: Provision GW1
# hosts:
# - gw1
Expand All @@ -80,6 +113,17 @@
# # - servers/apps/home-assistant
# - servers/apps/jenkins

=======
# - name: Provision mikeeClevo
# hosts:
# - mikeeClevo
# become: true
# roles:
# - servers/apps/nginx
# # - servers/apps/home-assistant
# - servers/apps/jenkins

>>>>>>> Stashed changes
# - name: Cleanup Docker
# hosts: clevo:!gw1:!vpn1
# become: true
Expand Down
1 change: 1 addition & 0 deletions roles/servers/apps/home-assistant/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ home_assistant:
- name: dol_1
door:
- name: garaz_brama
- name: dwor_brama
zbmini:
- name: sypialnia_gora
power_plug:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
j_username: !secret energa_username
j_password: !secret energa_password
sensor:
- unique_id: consumed_energy_total
- unique_id: consumed_energy_dzien_total
name: Consumed energy total
select: 'div#right > table > tr:nth-of-type(1) > td.last'
value_template: "{{ value|regex_replace('[^0-9,]', '')|replace(',', '.')|float }}"
Expand All @@ -44,12 +44,30 @@
state_class: total_increasing
on_error:
value: last
- unique_id: donated_energy_total
name: Donated energy total
- unique_id: consumed_energy_noc_total
name: Consumed energy total
select: 'div#right > table > tr:nth-of-type(3) > td.last'
value_template: "{{ value|regex_replace('[^0-9,]', '')|replace(',', '.')|float }}"
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
on_error:
value: last
- unique_id: donated_energy_dzien_total
name: Donated energy total
select: 'div#right > table > tr:nth-of-type(5) > td.last'
value_template: "{{ value|regex_replace('[^0-9,]', '')|replace(',', '.')|float }}"
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
on_error:
value: last
- unique_id: donated_energy_noc_total
name: Donated energy total
select: 'div#right > table > tr:nth-of-type(7) > td.last'
value_template: "{{ value|regex_replace('[^0-9,]', '')|replace(',', '.')|float }}"
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
on_error:
value: last
43 changes: 15 additions & 28 deletions roles/servers/apps/home-assistant/templates/config/ui-lovelace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,16 @@ views:
- type: entities
entities:
- entity: switch.4chpror3_switch_dwor_brama
type: custom:multiple-entity-row
name: Brama Dwor
icon: mdi:gate
toggle: true
show_state: true
entities:
- entity: sensor.door_battery_percentage_dwor_brama
name: Bateria
- entity: binary_sensor.door_state_dwor_brama
name: Stan
- entity: switch.4chpror3_switch_dwor_furtka
name: Furtka
icon: mdi:door
Expand Down Expand Up @@ -443,35 +451,14 @@ views:
- type: humidifier
entity: humidifier.nawilzacz_powietrza
- type: entities
title: Tesla Wall Connector
entities:
- entity: siren.downstairs_siren
name: Siren
- entity: sensor.downstairs_volume
name: Volume
title: Ring Dzwonek Dol
- type: grid
square: false
columns: 1
cards:
- type: entities
entities:
- entity: sensor.furtka_battery
name: Battery
- entity: binary_sensor.furtka_ding
name: Ding
- entity: sensor.furtka_last_activity
name: Last Activity
- entity: sensor.furtka_last_ding
name: Last Ding
- entity: sensor.furtka_last_motion
name: Last Motion
- entity: binary_sensor.furtka_motion
name: Motion
- entity: sensor.furtka_volume
name: Volume
title: Ring Furtka
- type: picture-entity
entity: camera.furtka
- entity: sensor.tesla_wall_connector_energy
name: Energy
- entity: sensor.tesla_wall_connector_session_energy
name: Session energy
- entity: sensor.tesla_wall_connector_status
name: Status
- type: media-control
entity: media_player.spotify_mikiq1w2
- theme: Backend-selected
Expand Down

0 comments on commit c0a3a82

Please sign in to comment.