Giter Club home page Giter Club logo

tpbulb's Introduction

TPBulb

Quick workaround that adds transitions support to my TPLink LB120 bulbs in HomeAssistant. It does not create a separate entity, just adds a tpbulb service that can be used in automations. By not creating separate entities, you can use native HomeAssistant tplink component alongside these services.

I still hope for native transitions support in pyHS100 and tplink component.

Use at your own risk.

Installation

Clone the repo to your homeassistant/config/custom_components/ directory and initialise it with

tpbulb:
  - name: <name you will reference the bulb in automations>
    host: <ip>
  - name: <bulb name>
    host: <ip>

in configuration.yaml.

Services

  • turn_on(

    • name - bulb name as defined in configuration.yaml

    )

  • turn_off(

    • name - bulb name as defined in configuration.yaml

    )

  • transition(

    • name - bulb name as defined in configuration.yaml
    • color_temp - to transition color_temp
    • brightness - to transition brightness
    • transition_period - in milliseconds

    )

    Manual transition service, parameters are optional if you want to change color_temp or brightness only.

  • sunrise(

    • name - bulb name as defined in configuration.yaml
    • transition_period - in milliseconds, default 30 minutes

    )

    Simulates sunrise in three stages over a default time period of 30 minutes.

  • sundown(

    • name - bulb name as defined in configuration.yaml
    • transition_period - in milliseconds, default 30 minutes

    )

    Simulates sundown in two stages over a default time period of 30 minutes.

  • day(

    • name - bulb name as defined in configuration.yaml

    )

    Turn on light to day mode

  • night(

    • name - bulb name as defined in configuration.yaml

    )

    Set light to night mode and turn off

Examples

Example automation

automation:

  - alias: Weekday wake-up
    trigger:
      platform: time
      at: "05:30:00"
    condition:
      condition: time
      weekday:
        - mon
        - tue
        - wed
        - thu
        - fri
    action:
      service: tpbulb.sunrise
      data:
        name: badroom-corner-light

License

MIT License

tpbulb's People

Contributors

asmyczek avatar

Watchers

James Cloos 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.