1
0
mirror of https://github.com/Adam-Ant/home-assistant synced 2024-12-20 12:54:35 +00:00

Seperate Sensors into Folder

This commit is contained in:
Adam Dodman 2016-11-29 18:40:14 +00:00
parent 64c7f6ed1f
commit 6e33839f1e
7 changed files with 37 additions and 37 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
secrets.yaml
known_devices.yaml

View File

@ -42,7 +42,7 @@ mqtt:
notify: !include notify.yaml
sensor: !include sensor.yaml
sensor: !include_dir_merge_list sensors
media_player:
- platform: samsungtv

View File

@ -1,36 +0,0 @@
# Temp and Humidity Monitoring
- platform: mqtt
state_topic: 'tortoise/sensor1'
name: 'Temperature'
unit_of_measurement: '°C'
value_template: '{{ value_json.temperature }}'
- platform: mqtt
state_topic: 'tortoise/sensor1'
name: 'Humidity'
unit_of_measurement: '%'
value_template: '{{ value_json.humidity }}'
# Plex Media Server
- platform: plex
name: Plex Sensor
host: 192.168.1.3
#### Pill Time Counters###
#Current Time
- platform: time_date
display_options:
- 'date_time'
# Seconds since Pill Button Sensor changed
- platform: template
sensors:
last_pill:
unit_of_measurement: Sec
friendly_name: Pill Last Taken
value_template: '{% if states.sensor.pill_button_sensor.last_updated is undefined %}{{"00:00:00"}}{% else %}{{ ((as_timestamp(states.sensor.date__time.last_updated)-as_timestamp(states.sensor.pill_button_sensor.last_updated))|int) }}{% endif %}'
# Push Button Sensor
- platform: mqtt
name: Pill Button Sensor
state_topic: 'dash/pill_reminder'
hide: false

14
sensors/pill_button.yaml Normal file
View File

@ -0,0 +1,14 @@
# Seconds since Pill Button Sensor changed
- platform: template
sensors:
last_pill:
unit_of_measurement: Sec
friendly_name: Pill Last Taken
value_template: '{% if states.sensor.pill_button_sensor.last_updated is undefined %}{{"00:00:00"}}{% else %}{{ ((as_timestamp(states.sensor.time.last_updated)-as_timestamp(states.sensor.pill_button_sensor.last_updated))|int) }}{% endif %}'
# Push Button Sensor
- platform: mqtt
name: Pill Button Sensor
state_topic: 'dash/pill_reminder'
hide: false

4
sensors/plex.yaml Normal file
View File

@ -0,0 +1,4 @@
# Plex Media Server
- platform: plex
name: Plex Sensor
host: 192.168.1.3

5
sensors/time.yaml Normal file
View File

@ -0,0 +1,5 @@
#Current Time
- platform: time_date
display_options:
- 'date_time'

11
sensors/tortoise.yaml Normal file
View File

@ -0,0 +1,11 @@
# Temp and Humidity Monitoring
- platform: mqtt
state_topic: 'tortoise/sensor1'
name: 'Temperature'
unit_of_measurement: '°C'
value_template: '{{ value_json.temperature }}'
- platform: mqtt
state_topic: 'tortoise/sensor1'
name: 'Humidity'
unit_of_measurement: '%'
value_template: '{{ value_json.humidity }}'