Newbie question: return lights to previous state

why do things manually if you can automate them. Thats what Home-assistant is for…

still if you must set it manually, you can have an input_select set to that scene, and the automation can then check that input_select, and decide what scene to revert to later the flashings done.

input_select.scene with options Movie, Ambient, bright.

have the automation set the scene again with a template:

service: scene.turn_on
data_template: >
  entity_id: scene.livingroom_{{states('input_select.scene')|lower}}

of the top of my head, probably needs finetuning but you get the drift.

1 Like

Do you have a camera in your living room and run tensor flow to detect if you are reading a book and adjust the light accordingly, or do you just flip a switch or ask alexa/almond/google to set the lights?

Thanks. That goes straight over my head for now, I just dont get templates yet, but glancing over the documentation of input_select, it sounds like a global variable and it may be a solution also for other things I had been looking for, like various for climate control “states”(home/work@home/away/vacation/… ). Il do some more reading…

that would be a great idea :wink:

1 Like

That works if you only want your lights in a certain scene.

If you have carefully crafted the lights manually for the moment, but because it is just for this place and time, then the doorbell goes, you lost your settings.

correct, I merely reflected on OP’s description of his scenes for the livingroom.

I like the new option for creating scenes in the fly, which can be very useful for these sudden situations indeed

I can live with that limitation for now. Doing some more googling, it appears your “template on the fly” solution, while it sounds like a good and obvious solution, will not work:

Unless something changed between then and now, but the github issue is still open, so I guess not.

There was a change to scenes in the latest release. What @nickrout wrote about creating scenes on the fly is totally valid and works. I also think it’s the perfect solution for your issue.

of course it is. but we shouldn’t disturb him while he’s reading up :wink:

1 Like

Ha! I was going to say with the recent scene change you could create a scene on the fly and then restore it as well! Hahaha…

My friends keep disturbing me.
“What have you been doing all week vertigo?”
“Ive watched a dozen youtube tutorials on setting up a basic HA environment, then read 20 blog posts, had to learn YAML syntax and wrote pages of code to integrate 3 devices that other smart platforms recognize with a few clicks. Then I wrote 10 pages of code, learned MQTT, node-red, flashed 10 light bulbs with a custom firmware, and now Im studying jinja syntax”
“why?”
“So I know someone rings the door, and to keep the lights on”

Feel free to make fun of my ignorance, but honestly, if someone like me, who has a background in IT with decent knowledge of linux and at least some basic python and C coding experience, who has been hacking (simple) stuff on arduino’s for a decade, needs to spend THIS much time and research on getting basic functionality working, then HA is doing something wrong.

I knew HA wasnt going to be as easy as say smartthings, and I may be unlucky by having the “wrong” smart devices that NONE besides my chromecast where auto detected or configurable without writing code, and I had no idea my initial goals for this project would be ambitious rather than basic (adjusting thermostats based on a schedule and my location, and flashing lights on doorbell to me seemed like basic stuff just to get in to it) but I didnt expect it to be this hard and time consuming. Its been frustrating and Im still considering smashing my Pi with a hammer.

1 Like

Don’t watch youtube tutorials! They are outdated very fast as development of HA is extremly fast. Follow the official documentation and if this is not enough come here for help. Setting up hass.io for example is so easy, no need to read 100 pages and watch 10 videos, me as someone without an IT background setup Hass.io in less than 1 hour (most of the time it’s loading and installing). Now I even have a more “complex” setup with a VM in Proxmox and USB passthrough of two sticks and still it was easy as pie, searching the right things here or on google lead to the right results quickly.

What would then be more advanced stuff for you? Flashing the lights on doorbell is not so easy due to the hardware you are using. If the bulb supports flashing the light this would be easy, now you need a “workaround” and multiple people in here already provided you different solutions for your problem. You won’t even be able to do this stuff with other systems.

not mocking your ignorance.
amazed by your attitude…

this is what you post:
35
and all of a sudden you have:

and start blaming a platform you barely know. ‘Newbie’, remember?

Hope you find your answers, best of luck getting help approaching this great community like you do.

2 Likes

Its certainly not intuitive. In order to do anything, I had to get my wifi bulbs, tado thermostat, ring doorbell, logitec harmony hub, and/or samsung IP camera working. All these devices are actually supported, natively, but guess how many of these where auto detected? Zero. Literally nothing besides my chomecast.

So you search through the plugins, and you find, nothing. You search in the integration list and you find, nothing. I gave up right there the first time, because I expected one or two to require some work, perhaps one that would not work at all, but when nothing is auto detected or even listed as plugin, you might as well throw the towel, no?

So a week later you try again, you google and you find that need to add a few lines in configuration.yaml. Cool. How? What is this file, where is it, and how do I get to it? You go through every setting or config or tool menu of the interface, and you find nothing. You try ssh, you try samba… nope. So you google again. You need to install a configurator addon. Why did I not think of that, installing an optional addon thats listed among different database engines and stuff I have no clue what they are for, to be able to configure HA and enable a device thats supported natively.

Then you dont know any yaml, dont know it cares about indentation. It cares about uppercase. Does it say that anywhere in the documentation? If so, then I missed it. So after doing it wrong a few times using uppercase and not getting any error message, you figure out Tado is not the same as tado and when you restarted HA for the umpeeth time with the correct indentation and lowercase, it still doesnt say it detected anything. The tados and ring and tuya bulbs still wont show up in the device list. They still wont show up under integration. They work (if you did it right), and you will find them under “entities”, or in the developer toobox, but what newbie would look for it there ? Whats an entity anyway, as clearly the other devices are listed under devices.

Then there is all the stuff thats not necessarily HA fault, but seriously adds up. In order for my lights to switch on/off a bit faster than one per second, I needed to ditch Tuya cloud and install tasmota. That was the plan from the getgo. Works great with HA they said. Well, it does I suppose, but I dare anyone to explain to a friend how to configure that over the phone. I dread the say a bulb dies. And after you struggled for a day to get tasmota on the bulbs and understanding MQTT, then you still dont get control over basic stuff like fading and transition speed. Tasmota firmware has a setting for it. HA has parameters for it. But they dont work together. Needs more googling and hacking. Not that my other devices have been easy and dont get me started on lovelace.

I erased that from my memory for now.

Sorry to Re hash this one point but I honestly swear that Marius solved this issue ‘Really early on’ and everyone just skipped over it / dismissed it.
(and I’m not taking anything away from any of the other contributors here who have all proffered adequate if not genius solutions too; nick, the on the fly scene thing is a hum dinger)
Vertigo says he sets a scene manually, what Marius’s suggestion is that you ‘still’ set the scenario (not necessarily a scene) but you set it by ‘manually’ setting a sticky control.
You only want to set 1 light to flash red (or whatever) and that light is normally in this scene1 or in that scene2 or that scene3. You should not set scenes for overlapping areas and now you can’t call scenes from scenes (use scripts instead) so for that ‘room’ you set the ‘scene’ and you do that by literally selecting the scene from an input_select. Done. (or have it call the script)
The door bell rings, it changes x light to red for 15 seconds
The 15seconds ends and it changes the scene which is currently set as ‘reading book’ to ‘reading book’ (cos it’s stored in the sticky) and everything is back to how it was, ie overwritten by how it should be.
I’m not quite sure there is even a problem here :man_shrugging:

Edit: I personally don’t like the way you want to do this (as you’d have to create an ‘everything off’ scene AND you’d have to always control by ‘scene’ not by entity) but that’s not my decision.
Edit2: And what you ‘actually’ want is not really that simple. It’s the equivalent of saying “this is my man cave, everything is just how I like it, magazines scattered just so, books on shelves ordered just so, action figures posed with this one running and that one tearing the head off this one. Now I’m going to let you into my man cave and you can move 1 thing - but when you leave, I’ll come back in and I want it to be just as “I” left it.”

1 Like

What did you expect? All plug and play and with a GUI? If so, then HA is not for you, as it’s not there yet. It’s the goal of the project, however it is not even at version 1.0 currently, but the developers are working hard on it. Just recently they introduced a GUI for automations and for scenes

What you mean nope? You ssh into your machine and the configuration.yaml file is right there.

You clearly missed it. It’s written here:

Can’t help you with anything related to tuya as I don’t own any of these, but others in here are for sure able to help you.

What’s the matter with lovelace? It has a learning curve as everything related to HA, but it’s certainly amazing and no other system can compete with the flexibility and possibilities of lovelace in my opinion.

You realize that home assistant is the only open source home automation package with auto detection?

I feel like you expect smart things or fully GUI experience. If that’s the case, home assistant is not for you.

1 Like

I dont need a GUI for everything, but I did expect a GUI to at least get me started with something, like an interface to detect/select/configure/enable devices HA actually supports out of the box, and a place to enter my tado/tuya/ring/ifttt/whatever credentials. That doesnt sound like a lot to ask, does it?

Like I said, maybe Im just unlucky with my devices, and its a smoother onboarding experience when you have philips HUE lights, and a Nest camera and thermostat, but what I experienced was off-putting to the extreme, and has to be relatively easy to fix. You should be able to configure those devices, which only need one line and a pair of credentials without googling and learning YAML.

SSH isnt installed by default. You have to enable the plugin. For which there is a nice and easy gui with an install and start button at the top begging to be pressed. But which wont work if you didnt scroll down and actually read that you need to modify the SSH config file right there, in the browser; which is ironic, given that you may be doing that to gain ssh access to edit the main configuration file for which there is no in-browser editor! And when you do that, then you get faced with a CLI thats not quite linux, and you need to understand the directory structure of hass.io.
You really dont see how a newbie would be thinking “this cant be right, this isnt how I configure a device for which HA has built-in support” ?

Meh, its both great and frustrating. Its not my biggest gripe with HA, in fact, its the main reason Im still sticking to it instead of openhab (which I found 10x easier to get going, and configure my devices, without googling anything or reading a single page, but its web interface is no where near as good). Lovelace is great when it does what you want it to do by default, it becomes frustratingly hard if you want to change anything. Like just the color of an icon. Or the history graph which is superb to use with climate entities, but then I want to remove the legend and Im stuck googling again. Or I want my RTSP camera, which doesnt provide a snapshot image URL, to show the livestream directly on a view.

You really are “unlucky” with your devices as they don’t support GUI configuration. The different integrations are managed by different developers and if they don’t add GUI config, you need to do it without it. Remember it’s all open source.

For easy configuration of devices you don’t need to learn YAML. Copy the examples from the integration page and change it to use your credentials. For example Harmony

remote:
  - platform: harmony
    name: Bedroom
    host: 10.168.1.13

Do you need to learn Yaml to change the IP and the name in these lines? I don’t think so.

If this is too compliacted for you, why don’t you just follow the getting started guide for home assistant. There is a chapter “advanced configuration”, which explains in detail how you do it.

If you would have followed the official getting started guide from beginning to end, you would have saved yourself a lot of time and frustration.

Its not “auto” when I have to create entries in a config file I wouldnt know how to access. The only thing autodetected was my chromecast.

Openhab is another opensource home automation package and it actually detected pretty much all my devices with a few clicks and for those it did not detect, I could select from a list and enter the credentials . I was up and running with a basic setup in minutes and I didnt have to read or google a thing.

HA has its strengths, but the initial setup and “newbie experience” is definitely not one of them.

@Vertigo we just discussed this last night on another thread. The answers you seek about restoring light settings are contained within. Long story short you can create a scene of your current settings using templates do what ya gotta do then restore that scene. It’s actually pretty simple once you understand what you’re looking at.

Edit: @Vertigo Here’s an example of what you can do.

    - service: scene.create
      data_template:
        scene_id: garage_door_lights
        entities:
          light.arrive_home_lights:
            state: "{{ states('light.arrive_home_lights') }}"
            brightness: "{{ state_attr('light.arrive_home_lights','brightness') }}"

    - service: script.turn_light_on
      data_template:
        light_name: 'garage_lights'
        brightness: 30
        ignore_user_state: 'true'

    - wait_template: "{{ is_state('sensor.side_entrance_motion','off') }}"
      timeout: '1:00:00'
      continue_on_timeout: true

    - delay: '0:05:00'

    - service: scene.turn_on
      entity_id: scene.garage_door_lights
2 Likes