mirror of
https://github.com/RichieCahill/dotfiles.git
synced 2026-04-17 13:08:19 -04:00
adding availability status to HA
This commit is contained in:
@@ -24,6 +24,7 @@
|
|||||||
gps_location = "!include ${./home_assistant/gps_location.yaml}";
|
gps_location = "!include ${./home_assistant/gps_location.yaml}";
|
||||||
heater = "!include ${./home_assistant/heater.yaml}";
|
heater = "!include ${./home_assistant/heater.yaml}";
|
||||||
van_weather = "!include ${./home_assistant/van_weather_template.yaml}";
|
van_weather = "!include ${./home_assistant/van_weather_template.yaml}";
|
||||||
|
status_indicator = "!include ${./home_assistant/status_indicator.yaml}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
recorder = {
|
recorder = {
|
||||||
|
|||||||
99
systems/brain/services/home_assistant/status_indicator.yaml
Normal file
99
systems/brain/services/home_assistant/status_indicator.yaml
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
input_select:
|
||||||
|
richie_status:
|
||||||
|
name: "Richie Status"
|
||||||
|
options:
|
||||||
|
- Available
|
||||||
|
- Busy
|
||||||
|
- Do Not Disturb
|
||||||
|
icon: mdi:account
|
||||||
|
initial: Available
|
||||||
|
|
||||||
|
partner_status:
|
||||||
|
name: "Partner Status"
|
||||||
|
options:
|
||||||
|
- Available
|
||||||
|
- Busy
|
||||||
|
- Do Not Disturb
|
||||||
|
icon: mdi:account
|
||||||
|
initial: Available
|
||||||
|
|
||||||
|
template:
|
||||||
|
- sensor:
|
||||||
|
- name: "Richie Status Icon"
|
||||||
|
state: >
|
||||||
|
{{ states('input_select.richie_status') }}
|
||||||
|
icon: >
|
||||||
|
{% set status = states('input_select.richie_status') %}
|
||||||
|
{% if status == 'Available' %}mdi:circle
|
||||||
|
{% elif status == 'Busy' %}mdi:circle-half-full
|
||||||
|
{% else %}mdi:minus-circle{% endif %}
|
||||||
|
|
||||||
|
- name: "Partner Status Icon"
|
||||||
|
state: >
|
||||||
|
{{ states('input_select.partner_status') }}
|
||||||
|
icon: >
|
||||||
|
{% set status = states('input_select.partner_status') %}
|
||||||
|
{% if status == 'Available' %}mdi:circle
|
||||||
|
{% elif status == 'Busy' %}mdi:circle-half-full
|
||||||
|
{% else %}mdi:minus-circle{% endif %}
|
||||||
|
|
||||||
|
script:
|
||||||
|
set_richie_available:
|
||||||
|
alias: "Richie → Available"
|
||||||
|
icon: mdi:circle
|
||||||
|
sequence:
|
||||||
|
- service: input_select.select_option
|
||||||
|
target:
|
||||||
|
entity_id: input_select.richie_status
|
||||||
|
data:
|
||||||
|
option: "Available"
|
||||||
|
|
||||||
|
set_richie_busy:
|
||||||
|
alias: "Richie → Busy"
|
||||||
|
icon: mdi:circle-half-full
|
||||||
|
sequence:
|
||||||
|
- service: input_select.select_option
|
||||||
|
target:
|
||||||
|
entity_id: input_select.richie_status
|
||||||
|
data:
|
||||||
|
option: "Busy"
|
||||||
|
|
||||||
|
set_richie_dnd:
|
||||||
|
alias: "Richie → Do Not Disturb"
|
||||||
|
icon: mdi:minus-circle
|
||||||
|
sequence:
|
||||||
|
- service: input_select.select_option
|
||||||
|
target:
|
||||||
|
entity_id: input_select.richie_status
|
||||||
|
data:
|
||||||
|
option: "Do Not Disturb"
|
||||||
|
|
||||||
|
set_maple_available:
|
||||||
|
alias: "Maple → Available"
|
||||||
|
icon: mdi:circle
|
||||||
|
sequence:
|
||||||
|
- service: input_select.select_option
|
||||||
|
target:
|
||||||
|
entity_id: input_select.partner_status
|
||||||
|
data:
|
||||||
|
option: "Available"
|
||||||
|
|
||||||
|
set_maple_busy:
|
||||||
|
alias: "Maple → Busy"
|
||||||
|
icon: mdi:circle-half-full
|
||||||
|
sequence:
|
||||||
|
- service: input_select.select_option
|
||||||
|
target:
|
||||||
|
entity_id: input_select.partner_status
|
||||||
|
data:
|
||||||
|
option: "Busy"
|
||||||
|
|
||||||
|
set_maple_dnd:
|
||||||
|
alias: "Maple → Do Not Disturb"
|
||||||
|
icon: mdi:minus-circle
|
||||||
|
sequence:
|
||||||
|
- service: input_select.select_option
|
||||||
|
target:
|
||||||
|
entity_id: input_select.partner_status
|
||||||
|
data:
|
||||||
|
option: "Do Not Disturb"
|
||||||
Reference in New Issue
Block a user