Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 106624

Creating scenes through the REST API does not save on reboot

$
0
0

I’m bulk creating imported scenes via the REST API, here’s an example payload:

Endpoint: http://myhass:8123/api/services/scene/create

{
    "scene_id": "example_scene",
    "entities": {
        "light.hutch": {
            "state": "on",
            "kelvin": 3000,
            "brightness": 134
        },
        "light.spiral": {
            "state": "on",
            "kelvin": 3500,
            "brightness": 198
        },
        "light.pedestal": {
            "state": "on",
            "kelvin": 3000,
            "brightness": 183
        },
        "light.crate": {
            "state": "on",
            "kelvin": 3500,
            "brightness": 255
        }
    }
}

The scene is saved (though not editable via the interface and does not appear in the scenes.yaml file). It still works, though.

However upon host reboot everything is gone. I have the following questions:

  • Is there a way to persist these scenes directly to the scenes.yaml via the REST API?
  • Can I assign a unique ID and a friendly name via the API? Apparently the scene_id property will not accept spaces, etc.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 106624

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>