Files
Home-AssistantConfig/config/packages/sleepiq.yaml
Carlo Costanzo c464073a0d Standardizing on Headers for all YAML files.
- Updated comments in various YAML configuration files to provide clearer descriptions of functionalities and integrations.
- Improved documentation for alarm, alexa_media_player, backups, blink, cbyge, climate, finance, fridge, garadget, glances, hass_agent_homepc, holiday, ios, landscape_lighting, lightning, logger, medicine, nfc_tags, noonhome, office_motion, phynplus, powerwall, printer, processmonitor, proxmox, rachio, rheem_econet, roku, sleepiq, space, speedtest, stats, superbowl, vacuum, wireless, and youtube packages.
- Added relevant links and issue references where applicable to enhance user guidance and support.
2025-11-29 13:17:07 -05:00

72 lines
2.1 KiB
YAML
Executable File

#-------------------------------------------
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# SleepIQ - Bed presence and Sleep Number metrics.
#-------------------------------------------
######################################################################
## SleepIQ sensors and automation helpers.
######################################################################
homeassistant:
customize_glob:
"sensor.*_sleep_hours":
unit_of_measurement: hours
icon: mdi:sleep
# customize:
# sensor.Carlo_sleep_hours:
# friendly_name: 'Carlo Slept last night'
# sensor.Stacey_sleep_hours:
# friendly_name: 'Stacey Slept last night'
#-------------------------------------------
sleepiq:
username: !secret sleepiq_username
password: !secret sleepiq_password
#-------------------------------------------
# sensor:
# - platform: history_stats
# name: Carlo_sleep_hours
# entity_id: binary_sensor.sleepnumber_carlo_carlo_is_in_bed
# state: 'on'
# type: time
# end: '{{ now() }}'
# duration:
# hours: 24
#
# - platform: history_stats
# name: Stacey_sleep_hours
# entity_id: binary_sensor.sleepnumber_carlo_stacey_is_in_bed
# state: 'on'
# type: time
# end: '{{ now() }}'
# duration:
# hours: 24
group:
bed:
entities:
- binary_sensor.sleepnumber_carlo_carlo_is_in_bed
- sensor.sleepnumber_carlo_carlo_sleepnumber
# - sensor.Carlo_sleep_hours
- binary_sensor.sleepnumber_carlo_stacey_is_in_bed
- sensor.sleepnumber_carlo_stacey_sleepnumber
# - sensor.Stacey_sleep_hours
automation:
- alias: "CARLO-HOMEPC - Lock PC and Sleep Monitors When Carlo Is in Bed"
id: 25c69640-4c38-46a2-82ae-5a32c3c6f1b4
mode: single
trigger:
- platform: state
entity_id: binary_sensor.sleepnumber_carlo_carlo_is_in_bed
from: 'off'
to: 'on'
action:
- service: button.press
target:
entity_id: button.carlo_homepc_carlo_homepc_lock
- service: button.press
target:
entity_id: button.carlo_homepc_carlo_homepc_monitorsleep