Giter VIP home page Giter VIP logo

Comments (4)

encor50 avatar encor50 commented on May 23, 2024

you have to use trigger ? when ur esp goes online turn on the light ?

from esp-mqtt-json-digital-leds.

euf0ria avatar euf0ria commented on May 23, 2024

So you are implying that the strip is off when powered on just because the current state in home assistant is off (because is goes to off when esp is pulled offline)?

I will try an automation which sets the strip state to on and use esp onlinestatus as trigger.
But, isn't this going to rely on the device_tracker monitoring the esp? I dont want this because my tracker only checks status every 30 seconds and i intend to keep it that way.

Compare this to a meelight or yeelight smartbulb: They do not depend on home assistant and device tracking. When i give them power via a regular wall switch they light up and then report current state to home assistant.

I want the same for this led-strip: To be able to set the initial state to on, this will then report to home assistant via MQTT with the correct state.

from esp-mqtt-json-digital-leds.

KodiMkd avatar KodiMkd commented on May 23, 2024

can you leave the code so us (little rusty) to use it ?? and also can you do random effects in the loop ?? because i think will be boring same order effects non stop. i wish i can find like 100+ effects that work with this bruh automation so more choice-the better.

from esp-mqtt-json-digital-leds.

euf0ria avatar euf0ria commented on May 23, 2024

@encor50
Got it sorted out! One word in the code did the trick.

Look for these lines: (note that the initial state is set to false)
/******************************** GLOBALS for fade/flash *******************************/
bool stateOn = true; //true = Strip ON when powered on. false = strip OFF when powered on

@bruhautomation: It would be awesome if you could add this comment in your code to make is easier for newcomers to find this tweak.

from esp-mqtt-json-digital-leds.

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.