Code Monkey home page Code Monkey logo

Comments (4)

mikepell007 avatar mikepell007 commented on May 20, 2024 1

Ok. I did see that, but I just did not get it until now.

Thanks!

from entity-controller.

danobot avatar danobot commented on May 20, 2024

Thank for that, feel free to PR a fix. I don't use scenes myself and didn't realise they have a different state :)
Can you post your configuration please?
Scenes cannot be turned off last time I read the documenation. What are you doing to turn off the scene?

from entity-controller.

danobot avatar danobot commented on May 20, 2024

For the component to work entity_on must have on and off states. Scenes are always in scening state regardless of whether they are active or not. As such the component does not support scenes and scripts for the moment. The addition of entity_off was supposed to fix this.

The only way I can think of right now to make it work would be to separate the entity_on into entity_on and entity_state where entity_state is the entity whose state should be used to control the motion light.

I am working on a fix for this :)

from entity-controller.

danobot avatar danobot commented on May 20, 2024

I knew there was a way to do this already... This is not documented well. You can actually specify an entity to be used for entity state and use scene/script for entity_on. You must also supply entity_off to undo what entity_on turned on.

defect_test:
  module: motion_lights
  class: MotionLights
  entity: light.tv_led
  entity_on: scene.presence_lights
  entity_off: script.turn_off_presence_lights
  sensors:
    - binary_sensor.living_room_motion

This will activate your scene, observe an entity who is part of the scene, and use the entity_off script to turn off the scene when it times out.
I will update the documentation.

from entity-controller.

Related Issues (20)

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.