Changing input_number doesn't work

well spotted!

so it looks like it depends on an integration - some of them accept templates in input data and some don’t.

here’s how input_number is configured inside:

component.async_register_entity_service(
        SERVICE_SET_VALUE,
        {vol.Required(ATTR_VALUE): vol.Coerce(float)},
        "async_set_value",
    )

so good luck in passing templates to it :wink:

on the other hand, with persistent_notification:

SCHEMA_SERVICE_CREATE = vol.Schema(
    {
        vol.Required(ATTR_MESSAGE): cv.template,
        vol.Optional(ATTR_TITLE): cv.template,
        vol.Optional(ATTR_NOTIFICATION_ID): cv.string,
    }
)

So yes, it depends on an integration you’re using.

Speaking about persistent_notification - the docs would benefit from mentioning this handy feature.
Actually, I use it all the time but didn’t think there is no mention of templates’ support in the docs.
It’s there, but below service parameters’ description - not ideal I’d say, so easy not to reach that line… :frowning:
PR merged!

@jocnnor, looks like we’re too fast to answer :man_facepalming:

1 Like