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
71.03k stars 29.69k forks source link

Failed to call service screenlogic.set_color_mode #107838

Closed sanemanmad closed 7 months ago

sanemanmad commented 7 months ago

The problem

Lately the screenlogic service call is failing with an error "Failed to call service 'set_color_mode'", however the API call is successful and does issue command, which resulted in the light mode being set. The issue however is that due to the error any automations calling this service will also fail.

For example, I have an automation that runs each night chooses a random color and then shortly thereafter a second automation will run to turn on the intellibrite light using that color and will also set additional lights in my home outside to use the same color. However, those lights will fail to turn on because the automation subsequently errors out. I am going to switch the order of the calls and see if my automations will continue to work, albeit it does not resolve the overall problem.

What version of Home Assistant Core has the issue?

core_2024.1.2

What was the last working version of Home Assistant Core?

core_2023.12.4

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Pentair screenlogic

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

alias: Pool - Intellibrite light color mode
description: ""
trigger:
  - platform: state
    entity_id:
      - input_select.pentair_intellibrite
condition: []
action:
  - if:
      - condition: template
        value_template: "{{ (states('input_select.pentair_intellibrite')) == 'white' }}"
    then:
      - service: screenlogic.set_color_mode
        data:
          color_mode: white
        target:
          entity_id: light.pentair_xx_xx_xx_pool_light
      - service: light.turn_on
        data:
          color_name: white
          brightness_pct: 100
        target:
          entity_id: light.pebble_lighting

Anything in the logs that might be useful for us?

2024-01-11 20:38:28.844 ERROR (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Error executing script. Error for call_service at pos 1: Failed to call service 'set_color_mode'
2024-01-11 20:38:28.846 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547595327040] Error handling message: Failed to call service 'set_color_mode'

Additional information

No response

home-assistant[bot] commented 7 months ago

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

Code owner commands Code owners of `screenlogic` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign screenlogic` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


screenlogic documentation screenlogic source (message by IssueLinks)

sanemanmad commented 7 months ago

Confirmed. Changing the order in which the lights were called does resolve my automation problem. However the error is still present. Screenshot_20240111-205809

bdraco commented 7 months ago

Does the problem happen if you call the service manually in the developer tools?

You might get a better traceback in the log doing it that way

sanemanmad commented 7 months ago

Yes, seeing error in developer tools as well. I tried attaching the debug log and diagnostic output but looks like a ton of garbage. Non-related. I will try to get more specific sample of the logs tomorrow.

dieselrabbit commented 7 months ago

I believe I know what this is. Should be an easy fix.

sanemanmad commented 7 months ago

Thank you for the rapid response! Open source is the greatest contribution ever and HA community just rocks!!