Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch template service called not work #106655

Closed
Vost3 opened this issue Dec 29, 2023 · 5 comments
Closed

Switch template service called not work #106655

Vost3 opened this issue Dec 29, 2023 · 5 comments

Comments

@Vost3
Copy link

Vost3 commented Dec 29, 2023

The problem

Hello there,

Since release 2023.11.4 we experiencing a bug on custom_component "hass-palazzetti" issue here

When switch is toggled the service is not called
So I can call the service through tools dev call service tab
Through the tools dev, the call work ( i receive the command on fake http server )
But when i toggle the switch nothing is call

When I run Hass this issue appear on log ( in red ) on previous releases not
image

image

image

What version of Home Assistant Core has the issue?

core-2023.11.4 and after

What was the last working version of Home Assistant Core?

core-2023.11.3

What type of installation are you running?

Home Assistant Container

Integration causing the issue

switch template

Link to integration documentation on our website

https://www.home-assistant.io/integrations/switch.template/

Diagnostics information

No response

Example YAML snippet

palazzetti:
  ip: 192.168.2.13

#############################################
#                 Switch                    #
#############################################
switch:
  - platform: template
    switches:
      #############################################
      #                 palazzetti                #
      #############################################
      # State
      stove_status:
        friendly_name: "État"        
        value_template: "{{ state_attr('palazzetti.stove', 'STATUS') | int > 0 and state_attr('palazzetti.stove', 'STATUS') | int != 10 }}"
        turn_on:
          service: palazzetti.set_parms
          data:
            STATUS: "on"
        turn_off:
          service: palazzetti.set_parms
          data:
            STATUS: "off"
        icon_template: >-
          {% if state_attr('palazzetti.stove', 'STATUS') | int > 0 %}
            mdi:fireplace
          {% else %}
            mdi:fireplace-off
          {% endif %}  

input_number:
  # Fan level
  stove_fan_lvl:
    name: "Ventilation"
    min: 0
    max: 7
    step: 1
    icon : mdi:fan

          
  #Fire level
  stove_fire_lvl:
    name: "Puissance"
    initial: 1
    min: 1
    max: 5
    step: 1
    icon: mdi:fire

sensor:
  - platform: template
    sensors:
      #############################################
      #                 palazzetti                #
      #############################################
      stove_temperature:
        friendly_name: Temperature Poele
        value_template: "{{ state_attr('palazzetti.stove', 'T1') | float }}"
        icon_template: mdi:thermometer
        unit_of_measurement: °C

  
input_text:
  text_test:
    name: "Test"

Anything in the logs that might be useful for us?

2023-12-29 13:03:48.836 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration palazzetti which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-12-29 13:03:52.634 ERROR (MainThread) [homeassistant.setup] Setup failed for 'service': Integration not found.

Additional information

No response

@home-assistant
Copy link

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

Code owner commands

Code owners of template 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 template 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)


template documentation
template source
(message by IssueLinks)

@tdejneka
Copy link

I don't know if you are aware but problems with custom integrations are not supported here, only native integrations. Refer the problem to the custom integration's author.

@Vost3
Copy link
Author

Vost3 commented Dec 30, 2023

Hi

I'm the Author ;)
The issue is the call of an service by a "switch template" ( that is an official intergration ^^ ) .
Yes the service is in custom component, i understand .

But why it can be call through "developper tools", and not by "switch template" ?
Why that work with release before 2023.11.4 and not after ? ( nothing was changed in side of custom component )
I found nothing that was changed about "switch" "template" "service call" in release notes ...

image
image

I understand the fact of custom component has no support from homeassistant.
But I think the issue is not the custom component or I miss something

@Vost3
Copy link
Author

Vost3 commented Dec 30, 2023

Fix did on custom component.
You can close.

Just for your information.
When I use tools develloper to call the service:
service: palazzetti.set_parms data: STATUS: "on"
That send a type <class 'str'>

service: palazzetti.set_parms data: STATUS: on
That send a type <class 'str'> too

When I use switch template
turn_on: service: palazzetti.set_parms data: STATUS: on
Send a type <class 'bool'> normal

turn_on: service: palazzetti.set_parms data: STATUS: "on"
Send a type <class 'homeassistant.util.yaml.objects.NodeStrClass'> ?

There is a new type send now by siwtch template

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@issue-triage-workflows issue-triage-workflows bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 5, 2024
@github-actions github-actions bot locked and limited conversation to collaborators May 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants