Open bakerkj opened 5 months ago
Hey there @niklasweber, mind taking a look at this issue as it has been labeled with an integration (dfrobot_sen0395
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
@niklasweber is there a chance you could help me with this?
Thanks!
Hi @bakerkj, thank you for posting the issue. This seems strange. It seems to be related to the number component. When I use the yaml config you provided, I get the same error. But it works when I call the settings action from a button component:
button:
- platform: template
name: sensitivity
on_press:
- dfrobot_sen0395.settings:
id: mmwave_one
sensitivity: 5
I'm not too familiar with esphome templates. Somehow when using the number component, the template has two float values, which is not compatible with the action I defined in the component. @jesserockz do you have an idea why the settings action works for the button component, but not for the number component? Do I need to define another class in automation.h?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
The problem
I am trying to use the relatively new dfrobot_sen0395 component. When I try to call dfrobot_sen0395.setting from within a number template set_action code generation completes, but the compiler fails to compile the generated code.
The set_action attemps to set the sensitivity to 5 for simplicity.
Which version of ESPHome has the issue?
2024.3.1
What type of installation are you using?
Home Assistant Add-on
Which version of Home Assistant has the issue?
2024.3.3
What platform are you using?
ESP32
Board
not relevant
Component causing the issue
dfrobot_sen0395
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response