John_P
(John)
December 8, 2023, 10:46am
1
Since last update automation isn’t able to start my firestove anymore.
I creates a servicecall for this in wich was calles in automation like this:
service: fire_stove.set_stove
data:
stove: ‘toggle’
It seems the data ‘toggle’ isn’t passed as a string anymore.
Why?
Dujith
(Charles Evers)
December 8, 2023, 10:54am
2
Gonna need alot more information. Like what integration are u using since fire_stove
is not part of HA by default. What does the trace say? What do the logs say?
Before we begin…
This forum is not a helpdesk
The people here don’t work for Home Assistant, that’s an open source project. We are volunteering our free time to help others. Not all topics may get an answer, never mind one that helps you solve your problem.
[image]
This also isn’t a general home automation forum, this is a forum for Home Assistant and things related to it. Any question about Home Assistant, and about using things with Home Assistant, is welcome here. We can’t help you with e…
tom_l
December 8, 2023, 11:15am
3
Search in Developer Tools → States for fire_stove
, what is the real entity id?
John_P
(John)
December 8, 2023, 1:18pm
4
It’s a self written custom integration with a registered service set_stove.
Until this release all was working well and now its stopped because the value send isn’t a string anymore.
This was one of the tests in the integration.
Running the service from developer or from template tapaction is working without problems.
Taken away the test of the value is a string in the integration and all is working again.
So why is the value not send as a string from automation?
koying
(Chris B)
December 8, 2023, 1:59pm
5
Obviously, “toggle” is a string, so it seem likely the culprit is your integration here, and specifically the way you test if the value is a string.
Code?
What does the debug code in your integration tell you?
(Kudos for the “how to not ask a question” example )
John_P
(John)
December 8, 2023, 3:33pm
6
Ooh sorrie testing like this
if type(value) != str:
return
I just don’t understand why in automation the service call is wrong and in tapaction the same service call is ok
Dujith
(Charles Evers)
December 8, 2023, 3:54pm
7
post the automation using code tags, that way we can see if anything looks weird.
Troon
(Troon)
December 8, 2023, 5:00pm
8
Debug log what type(value)
is returning if not str
.
koying
(Chris B)
December 8, 2023, 5:41pm
9
Post the full code of the integration, please.
Beyond what Troon says, we don’t know what “value” actually is. I’m sure you think you know, but you could be wrong
John_P
(John)
December 9, 2023, 6:50am
10
Here the difference of tye send by automation and send by template service call
===== value send: <class ‘homeassistant.util.yaml.objects.NodeStrClass’>
===== value send: <class ‘str’>
The call is the same everywhere if it’s on or off or toggle
service: fire_stove.set_stove
data:
stove: 'on'
John_P
(John)
December 11, 2023, 2:44pm
11
Installed the previous release from november back, all working again
John_P
(John)
December 17, 2023, 2:06pm
12
Solution is a change in integration:
type(value) != str: in not isinstance(value, str):
It doesn’t explain why data is different when send from automations