home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
74.21k stars 31.16k forks source link

Using the UI to create a scene with the current device states doesn't work #65850

Closed Angelos59 closed 2 years ago

Angelos59 commented 2 years ago

The problem

Using the UI to create a scene with the devices current state pops on the lower left side a black rectangle (no error text) and nothing happens. The scene is not saved. The devices are all Lutron Caseta and defined in the Lutron system and imported to HA via the integration.

Below is the log.

What version of Home Assistant Core has the issue?

core-2022.2.2

What was the last working version of Home Assistant Core?

Never used scenes before now

What type of installation are you running?

Home Assistant OS

Integration causing the issue

https://www.home-assistant.io/integrations/lutron_caseta

Link to integration documentation on our website

https://www.home-assistant.io/integrations/lutron_caseta

Diagnostics information

Screen Shot 2022-02-05 at 5 44 22 PM

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: aiohttp.server
Source: components/config/scene.py:64 
First occurred: 5:30:13 PM (1 occurrences) 
Last logged: 5:30:13 PM

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 98, in forwarded_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 79, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 219, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 137, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/__init__.py", line 159, in post
    self._write_value(hass, current, config_key, data)
  File "/usr/src/homeassistant/homeassistant/components/config/scene.py", line 64, in _write_value
    if CONF_ID not in cur_value:
TypeError: argument of type 'NoneType' is not iterable

Additional information

No response

probot-home-assistant[bot] commented 2 years ago

lutron_caseta documentation lutron_caseta source (message by IssueLinks)

probot-home-assistant[bot] commented 2 years ago

Hey there @swails, @bdraco, mind taking a look at this issue as it has been labeled with an integration (lutron_caseta) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

probot-home-assistant[bot] commented 2 years ago

scene documentation scene source (message by IssueLinks)

probot-home-assistant[bot] commented 2 years ago

lutron_caseta documentation lutron_caseta source (message by IssueLinks)

probot-home-assistant[bot] commented 2 years ago

Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (scene) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

probot-home-assistant[bot] commented 2 years ago

Hey there @swails, mind taking a look at this issue as it has been labeled with an integration (lutron_caseta) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

bramkragten commented 2 years ago

Can you check your scenes.yaml file and share the content? You probably have a wrong value in there.

Angelos59 commented 2 years ago

My scenes.yaml file is empty. I was trying to add a scene using the UI to capture the current state of the device as the capability is there in the UI but it doesn't work for me. I know I can do it with Yaml and set the state to the values I want. In any case no big deal. Other scenes in my system have been imported through the Hue integration but have nothing in YAML

Thank you.

On Mon, Feb 7, 2022 at 2:05 PM Bram Kragten @.***> wrote:

Can you check your scenes.yaml file and share the content? You probably have a wrong value in there.

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/65850#issuecomment-1031814889, or unsubscribe https://github.com/notifications/unsubscribe-auth/AU2UVIQ4SDQLMSETQHX4QRTU2AJZHANCNFSM5NUPUXPA . You are receiving this because you authored the thread.Message ID: @.***>

-- Angelos Spetseris 508 769 7093

Angelos59 commented 2 years ago

I also tested with HUE devices and it doesn't work either

On Mon, Feb 7, 2022 at 2:05 PM Bram Kragten @.***> wrote:

Can you check your scenes.yaml file and share the content? You probably have a wrong value in there.

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/65850#issuecomment-1031814889, or unsubscribe https://github.com/notifications/unsubscribe-auth/AU2UVIQ4SDQLMSETQHX4QRTU2AJZHANCNFSM5NUPUXPA . You are receiving this because you authored the thread.Message ID: @.***>

-- Angelos Spetseris 508 769 7093

bramkragten commented 2 years ago

I just tested it with an empty scenes.yaml and it worked fine.

I am able to reproduce this by adding:

-

in the file, meaning an empty scene, that is not supported.

If you start home assistant, do you get an error in logs for the scene integration?

Something like: Unknown error validating None platform config with scene component platform schema

Angelos59 commented 2 years ago

Thanks for the help, good find with the dash, I removed the dash and it worked and got the following YAML but no entity. I expected an entity with porch_tv in it. Without the entity I have to create an automation to create an entity. A scene entity would be nicer.

But no entity. I don't see anything in the log related to this.

On Mon, Feb 7, 2022 at 4:47 PM Bram Kragten @.***> wrote:

I just tested it with an empty scenes.yaml and it worked fine.

I am able to reproduce this by adding:

-

in the file, meaning an empty scene, that is not supported.

If you start home assistant, do you get an error in logs for the scene integration?

Something like: Unknown error validating None platform config with scene component platform schema

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/65850#issuecomment-1031963291, or unsubscribe https://github.com/notifications/unsubscribe-auth/AU2UVIQ434BTECCNWCQMQVTU2A4V5ANCNFSM5NUPUXPA . You are receiving this because you authored the thread.Message ID: @.***>

-- Angelos Spetseris 508 769 7093

bramkragten commented 2 years ago

Do you have scenes.yaml in your configuration.yaml?

scene: !include scenes.yaml
Angelos59 commented 2 years ago

Thanks again, I had not included "scene: !include scenes.yaml" I thought it would be there by default. After I included it I cleared out scenes.yaml, restarted and created a new scene but still no entity. I am including the log below. If you can help I will be grateful. Love to be able to use scenes now that I know they exist. No worries if you can't. Angelos

Connection problem to snitun server 7:58:12 AM – (ERROR) /usr/local/lib/python3.9/site-packages/hass_nabucasa/remote.py - message first occurred at 7:58:00 AM and shows up 2 times Challenge/Response error with SniTun server (0 bytes read on a total of 32 expected bytes) 7:58:12 AM – (ERROR) /usr/local/lib/python3.9/site-packages/snitun/client/client_peer.py - message first occurred at 7:58:00 AM and shows up 2 times mac_dms not detected; websocket likely won't connect 7:58:03 AM – (WARNING) /usr/local/lib/python3.9/site-packages/alexapy/alexawebsocket.py Detected integration that accessed discovery_info.contains('ssdp_location') instead of discovery_info.upnp.contains('ssdp_location') or discovery_info.ssdp_headers.contains('ssdp_location'); this will fail in version 2022.6. Please report issue for upnp using this method at homeassistant/components/upnp/device.py, line 78: if ssdp.ATTR_SSDP_LOCATION not in headers: 7:58:01 AM – (WARNING) helpers/frame.py - message first occurred at 7:58:01 AM and shows up 2 times Value {} of type <class 'dict'> is invalid for Device.identify, expected value of type typing.Optional[aiohue.v2.models.feature.IdentifyFeature] 7:58:01 AM – (WARNING) /usr/local/lib/python3.9/site-packages/aiohue/util.py

On Tue, Feb 8, 2022 at 6:24 AM Bram Kragten @.***> wrote:

Do you have scenes.yaml in your configuration.yaml?

scene: !include scenes.yaml

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/65850#issuecomment-1032502356, or unsubscribe https://github.com/notifications/unsubscribe-auth/AU2UVIRTWCSNKYO7WBPNBH3U2D4P3ANCNFSM5NUPUXPA . You are receiving this because you authored the thread.Message ID: @.***>

-- Angelos Spetseris 508 769 7093

bramkragten commented 2 years ago

I recommend you to ask your question on discord.

https://www.home-assistant.io/help/

Angelos59 commented 2 years ago

Thanks, I will.

On Tue, Feb 8, 2022 at 12:40 PM Bram Kragten @.***> wrote:

I recommend you to ask your question on discord.

https://www.home-assistant.io/help/

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/65850#issuecomment-1032884615, or unsubscribe https://github.com/notifications/unsubscribe-auth/AU2UVISEZGWZ6NPMCRMYM63U2FIQTANCNFSM5NUPUXPA . You are receiving this because you authored the thread.Message ID: @.***>

-- Angelos Spetseris 508 769 7093