Giter Club home page Giter Club logo

ad-automoli's Introduction

AutoMoLi - Automatic Motion Lights

hacs_badge

Fully automatic light management based on motion as AppDaemon app.

Features

  • multiple daytimes to define different scenes for morning, noon, ...
  • supports Hue (for Hue Rooms/Groups) & Home Assistant scenes
  • switches lights and plugs (with lights)
  • supports illumination sensors to switch the light just if needed
  • supports humidity sensors as blocker (the "shower case")
  • supports fading: fade_on, fade_off
  • supports attributes in disable swtich entity
  • supports sun as daytimes

Installation

Use HACS or download the automoli directory from inside the apps directory here to your local apps directory, then add the configuration to enable the automoli module.

Requirements/Usage

some things are not yet documented here but the code is commented

  • This must be loaded/configured for every room separately, see example configuration.
  • if sensors/lights entities are in this form sensor.illumination_room, binary_sensor.motion_sensor_room or binary_sensor.motion_sensor_room_something and light.room, AutoMoLi will detect them automatically. Manually configured entities have precedence.

App configuration

Add your configuration to appdaemon/apps/apps.yaml, an example is below.

livingroom:
  module: automoli
  class: AutoMoLi
  room: livingroom
  disable_switch_entity: input_boolean.automoli
  delay: 600
  daytimes:
    - { starttime: "05:30", name: morning, light: "Morning" }
    - { starttime: "07:30", name: day, light: "Working" }
    - { starttime: "20:30", name: evening, light: 90 }
    - { starttime: "22:30", name: night, light: 20 }
    - { starttime: "23:30", name: more_night, light: 0 }
  illuminance_threshold: 100
  lights:
    - light.livingroom
  motion:
    - binary_sensor.motion_sensor_153d000224f421
    - binary_sensor.motion_sensor_128d4101b95fb7
  humidity:
    - sensor.humidity_128d4101b95fb7

bathroom:
  module: automoli
  class: AutoMoLi
  room: bathroom
  disable_switch_entity: 
    - input_boolean.automoli
    - input_boolean.automate_lights_livingroom,off
    - media_player.livingroom_atv,playing; media_content_type,video
    
  delay: 180
  motion_state_on: "on"
  motion_state_off: "off"
  daytimes:
    - { starttime: "05:30", name: morning, light: 45 }
    - { starttime: "07:30", name: day, light: "Day" }
    - { starttime: "20:30", name: evening, light: 100 }
    - { starttime: "22:30", name: night, light: 0 }
  humidity:
    - sensor.humidity_128d4101b95fb7
  humidity_threshold: 75
  lights:
    - light.bathroom
    - switch.plug_68fe8b4c9fa1
  motion:
    - binary_sensor.motion_sensor_158d033224e141

  fade_on: 7  
  fade_off: 20 
key optional type default description
module False string automoli The module name of the app.
class False string AutoMoLi The name of the Class.
room False string The "room" used to find matching sensors/light
disable_switch_entity True str A Home Assistant Entity as switch for AutoMoLi. If the state of the entity if off, AutoMoLi is deactivated. (Use an input_boolean for example)
delay True integer 150 Seconds without motion until lights will switched off. Can be disabled (lights stay always on) with 0
motion_event True string Please update your config to use motion_state_on/off
daytimes True list see code Different daytimes with light settings (see below)
lights True list/string auto detect Light entities
motion True list/string auto detect Motion sensor entities
illuminance True list/string Illuminance sensor entities
illuminance_threshold True integer If illuminance is above this value, lights will not switched on
humidity True list/string Humidity sensor entities
humidity_threshold True integer If humidity is above this value, lights will not switched off
motion_state_on True integer If using motion sensors which don't send events if already activated, like Xiaomi do, add this to your config with "on". This will listen to state changes instead
motion_state_off True integer If using motion sensors which don't send events if already activated, like Xiaomi do, add this to your config with "off". This will listen to the state changes instead.

daytimes

key optional type default description
starttime False string Time this daytime starts
name False string A name for this daytime
delay True integer 150 Seconds without motion until lights will switched off. Can be disabled (lights stay always on) with 0. Setting this will overwrite the global delay setting for this daytime.
light False integer/string Light setting (percent integer value (0-100) in or scene name)

ad-automoli's People

Contributors

benleb avatar efurban avatar samnewman86 avatar thundergreen avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.