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
script: | |
get_room_services: | |
sequence: | |
- variables: | |
room: > | |
{% if room is defined %} | |
{{ room }} | |
{% else %} | |
{{ states('sensor.room_audio') }} | |
{% endif %} |
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
# There are three ways you can add your sensors to Home Assistant, and they all start in the configuration.yaml file | |
# | |
# First you can just add them directly: | |
sensor: | |
- platform: | |
name: | |
# Or you can create a seperate file like sensors.yaml, | |
# you will need to of course create the sensors.yaml file first but add this to your configuration.yaml: | |
sensor: !include sensor.yaml |
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
# For more on these and more visit: https://ttl255.com/jinja2-tutorial-part-4-template-filters/ | |
# Covert Previous value to integter | |
| int | |
# Convert previous value to a decimal number, | |
# Replace 0 with number of decimals to include | |
| float(0) |
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
template: # Not needed if you are saving this in a template.yaml. But required in configuration.yaml or a package | |
- sensor: | |
- name: sensor_1 # not required, but should be - used as entity_id and friendly_name | |
unique_id: sensor_1 # not required, but is if you want to be able to manage this via the UI | |
icon: mdi:cat # not required | |
device_class: none # Can be helpful when displaying state, if not included default is none | |
# All Device Classes -> https://www.home-assistant.io/integrations/sensor/#device-class | |
state: > # required | |
{{ states('sensor.cat_count') | int }} |
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
# Get State of entity | |
{{ states('light.desk_backlight')}} | |
# Get Attribute Value | |
{{ state_attr('light.desk_backlight','energy')}} | |
# Do Mathy stuff - remeber PEMDAS | |
{{ ((states('sensor.basement_air_device_temperature') | int - 32) / 1.8) | round }} | |
# Get list of cameras, remove unavailable ones, list them and count them |
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
- cal_id: yourgooglecalemail@gmail.com | |
entities: | |
- device_id: mdl_holidays | |
name: MaisonDesLunes Holidays | |
search: "#mh" | |
track: true | |
max_results: 30 | |
- device_id: kid_events | |
name: Kid Events | |
search: "#se" |
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
alias: Webhook Lock | |
description: "" | |
trigger: | |
- platform: webhook | |
webhook_id: door_lock | |
condition: [] | |
action: | |
- service: input_text.set_value | |
target: | |
entity_id: input_text.bedroom |
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
# Create a lovelace card with these entities after addubg the above sensors and restarting home assistant | |
entities: | |
- entity: sensor.binary_sensor_count | |
- entity: sensor.tracker_count | |
- entity: sensor.lights_count | |
- entity: sensor.sensor_count | |
- entity: sensor.script_count | |
- entity: sensor.automation_count | |
- entity: sensor.entities_count |
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
service: notify.alexa_media | |
data: | |
message: > | |
<voice name="{{ voice }}"> <amazon:auto-breaths> <prosody rate="medium"> I | |
know a Haiku. This one is called, | |
{{ [ | |
'Good Morning From The Cat', | |
'Tee Rex Hug.', | |
'It Fits.', | |
'Minecraft Creepers.' |
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
mqtt: | |
device_tracker: | |
- name: phone1 | |
state_topic: "home/myphone" | |
- name: phone2 | |
state_topic: "home/yourphone" |
NewerOlder