Commit ab8ca854 authored by Ľuboš Jenčík's avatar Ľuboš Jenčík
Browse files

homeassistant

parent 1e705d1f
......@@ -27,5 +27,13 @@ services:
networks:
- iot_net_hackathon
homeassistant:
image: homeassistant/home-assistant:stable
ports:
- "8123:8123"
volumes:
- /etc/localtime:/etc/localtime:ro
- ./ha-config:/config
networks:
iot_net_hackathon:
2021.4.5
\ No newline at end of file
{
"version": 1,
"key": "auth",
"data": {
"users": [
{
"id": "e1c1de7135b9419386f3b38ae8cdeb07",
"group_ids": [
"system-admin"
],
"is_owner": true,
"is_active": true,
"name": "Hackathon-2021",
"system_generated": false
}
],
"groups": [
{
"id": "system-admin",
"name": "Administrators"
},
{
"id": "system-users",
"name": "Users"
},
{
"id": "system-read-only",
"name": "Read Only"
}
],
"credentials": [
{
"id": "33da0f9bc92c4c139140820d1d25899b",
"user_id": "e1c1de7135b9419386f3b38ae8cdeb07",
"auth_provider_type": "homeassistant",
"auth_provider_id": null,
"data": {
"username": "hackathon-2021"
}
}
],
"refresh_tokens": [
{
"id": "0013052e9ce64ebea0eb1fec5cc3254d",
"user_id": "e1c1de7135b9419386f3b38ae8cdeb07",
"client_id": "http://192.168.99.100:8123/",
"client_name": null,
"client_icon": null,
"token_type": "normal",
"created_at": "2021-04-26T10:51:17.254384+00:00",
"access_token_expiration": 1800.0,
"token": "b19236b075e820b9554d765d86c9ab457384fc99be14e5f12346f2ecae0dde83087a799c2c0d5c0daf16c91d964dfd09557d9b218df578f51fd283d077da6cc5",
"jwt_key": "93cb308d820fd6ed8dce3078445203835ebab871391fae48b10d5ba4ace8b08a1f34dcc2317c7d4fd0e99643816cb313ab38637782573dea8b8e8af4cefcdc87",
"last_used_at": "2021-04-26T10:51:17.254578+00:00",
"last_used_ip": "192.168.99.1",
"credential_id": "33da0f9bc92c4c139140820d1d25899b",
"version": "2021.4.5"
}
]
}
}
\ No newline at end of file
{
"version": 1,
"key": "auth_provider.homeassistant",
"data": {
"users": [
{
"username": "hackathon-2021",
"password": "JDJiJDEyJFVSb01Sd0w4cGpVbHJkLm14TDg4cS5PVUc3aVl2TzRHWlZXUnlROW1FNW5qd3hGOFdUTjUy"
}
]
}
}
\ No newline at end of file
{
"version": 1,
"key": "core.analytics",
"data": {
"preferences": {},
"onboarded": true,
"uuid": null
}
}
\ No newline at end of file
{
"version": 1,
"key": "core.area_registry",
"data": {
"areas": [
{
"name": "Living Room",
"id": "living_room"
},
{
"name": "Kitchen",
"id": "kitchen"
},
{
"name": "Bedroom",
"id": "bedroom"
}
]
}
}
\ No newline at end of file
{
"version": 1,
"key": "core.config",
"data": {
"latitude": 48.98544153800105,
"longitude": 20.691488741431385,
"elevation": 0,
"unit_system": "metric",
"location_name": "Garden",
"time_zone": "Europe/Prague",
"external_url": null,
"internal_url": null
}
}
\ No newline at end of file
{
"version": 1,
"key": "core.config_entries",
"data": {
"entries": [
{
"entry_id": "121265264c9f840f6382001db5ec23a7",
"version": 1,
"domain": "met",
"title": "Home",
"data": {
"track_home": true
},
"options": {},
"system_options": {
"disable_new_entities": false
},
"source": "onboarding",
"connection_class": "cloud_poll",
"unique_id": null,
"disabled_by": null
}
]
}
}
\ No newline at end of file
{
"version": 1,
"key": "core.device_registry",
"data": {
"devices": [
{
"config_entries": [
"121265264c9f840f6382001db5ec23a7"
],
"connections": [],
"identifiers": [
[
"met"
]
],
"manufacturer": "Met.no",
"model": "Forecast",
"name": "Forecast",
"sw_version": null,
"entry_type": "service",
"id": "9e24c145efa4daaceaba30d285d0fc96",
"via_device_id": null,
"area_id": null,
"name_by_user": null,
"disabled_by": null
}
],
"deleted_devices": []
}
}
\ No newline at end of file
{
"version": 1,
"key": "core.entity_registry",
"data": {
"entities": [
{
"entity_id": "binary_sensor.updater",
"config_entry_id": null,
"device_id": null,
"area_id": null,
"unique_id": "updater",
"platform": "updater",
"name": null,
"icon": null,
"disabled_by": null,
"capabilities": null,
"supported_features": 0,
"device_class": null,
"unit_of_measurement": null,
"original_name": "Updater",
"original_icon": null
},
{
"entity_id": "person.hackathon_2021",
"config_entry_id": null,
"device_id": null,
"area_id": null,
"unique_id": "hackathon_2021",
"platform": "person",
"name": null,
"icon": null,
"disabled_by": null,
"capabilities": null,
"supported_features": 0,
"device_class": null,
"unit_of_measurement": null,
"original_name": "Hackathon-2021",
"original_icon": null
},
{
"entity_id": "weather.garden",
"config_entry_id": "121265264c9f840f6382001db5ec23a7",
"device_id": "9e24c145efa4daaceaba30d285d0fc96",
"area_id": null,
"unique_id": "home",
"platform": "met",
"name": null,
"icon": null,
"disabled_by": null,
"capabilities": null,
"supported_features": 0,
"device_class": null,
"unit_of_measurement": null,
"original_name": "Garden",
"original_icon": null
},
{
"entity_id": "weather.garden_hourly",
"config_entry_id": "121265264c9f840f6382001db5ec23a7",
"device_id": "9e24c145efa4daaceaba30d285d0fc96",
"area_id": null,
"unique_id": "home-hourly",
"platform": "met",
"name": null,
"icon": null,
"disabled_by": "integration",
"capabilities": null,
"supported_features": 0,
"device_class": null,
"unit_of_measurement": null,
"original_name": "Garden Hourly",
"original_icon": null
}
]
}
}
\ No newline at end of file
{
"version": 1,
"key": "core.restore_state",
"data": [
{
"state": {
"entity_id": "person.hackathon_2021",
"state": "unknown",
"attributes": {
"editable": false,
"id": "hackathon_2021",
"user_id": "e1c1de7135b9419386f3b38ae8cdeb07",
"friendly_name": "Hackathon-2021"
},
"last_changed": "2021-04-26T10:43:47.384944+00:00",
"last_updated": "2021-04-26T10:43:47.384944+00:00",
"context": {
"id": "da68fd5ae6cc4f6b8940b013e2dcfb31",
"parent_id": null,
"user_id": null
}
},
"last_seen": "2021-04-26T11:09:32.660824+00:00"
}
]
}
\ No newline at end of file
{
"version": 1,
"key": "core.uuid",
"data": {
"uuid": "0135fa804fd3447e8f7186392d6147e3"
}
}
\ No newline at end of file
{
"version": 1,
"key": "http",
"data": {
"cors_allowed_origins": [
"https://cast.home-assistant.io"
],
"server_port": 8123,
"login_attempts_threshold": -1,
"ssl_profile": "modern",
"ip_ban_enabled": true
}
}
\ No newline at end of file
{
"version": 4,
"key": "onboarding",
"data": {
"done": [
"user",
"core_config",
"analytics",
"integration"
]
}
}
\ No newline at end of file
{
"version": 2,
"key": "person",
"data": {
"items": [
{
"name": "Hackathon-2021",
"user_id": "e1c1de7135b9419386f3b38ae8cdeb07",
"device_trackers": [],
"id": "hackathon_2021"
}
]
}
}
\ No newline at end of file
[]
\ No newline at end of file
blueprint:
name: Motion-activated Light
description: Turn on a light when motion is detected.
domain: automation
source_url: https://github.com/home-assistant/core/blob/dev/homeassistant/components/automation/blueprints/motion_light.yaml
input:
motion_entity:
name: Motion Sensor
selector:
entity:
domain: binary_sensor
device_class: motion
light_target:
name: Light
selector:
target:
entity:
domain: light
no_motion_wait:
name: Wait time
description: Time to leave the light on after last motion is detected.
default: 120
selector:
number:
min: 0
max: 3600
unit_of_measurement: seconds
# If motion is detected within the delay,
# we restart the script.
mode: restart
max_exceeded: silent
trigger:
platform: state
entity_id: !input motion_entity
from: "off"
to: "on"
action:
- alias: "Turn on the light"
service: light.turn_on
target: !input light_target
- alias: "Wait until there is no motion from device"
wait_for_trigger:
platform: state
entity_id: !input motion_entity
from: "on"
to: "off"
- alias: "Wait the number of seconds that has been set"
delay: !input no_motion_wait
- alias: "Turn off the light"
service: light.turn_off
target: !input light_target
blueprint:
name: Zone Notification
description: Send a notification to a device when a person leaves a specific zone.
domain: automation
source_url: https://github.com/home-assistant/core/blob/dev/homeassistant/components/automation/blueprints/notify_leaving_zone.yaml
input:
person_entity:
name: Person
selector:
entity:
domain: person
zone_entity:
name: Zone
selector:
entity:
domain: zone
notify_device:
name: Device to notify
description: Device needs to run the official Home Assistant app to receive notifications.
selector:
device:
integration: mobile_app
trigger:
platform: state
entity_id: !input person_entity
variables:
zone_entity: !input zone_entity
# This is the state of the person when it's in this zone.
zone_state: "{{ states[zone_entity].name }}"
person_entity: !input person_entity
person_name: "{{ states[person_entity].name }}"
condition:
condition: template
value_template: "{{ trigger.from_state.state == zone_state and trigger.to_state.state != zone_state }}"
action:
- alias: "Notify that a person has left the zone"
domain: mobile_app
type: notify
device_id: !input notify_device
message: "{{ person_name }} has left {{ zone_state }}"
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
# Text to speech
tts:
- platform: google_translate
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment