Hi,
Up to now I’ve always avoided the great pain of trying to figure out the HA templating documentation, but now I have no choice.
I want to configure a siren with multiple tones, but I’m completely lost. I suppose it starts with the cmd and state payload which would be something like
{
"state":"ON",
"tone":"motion"
}
or
{
"state":"ON",
"tone":"smoke"
}
But then how does the value template look like?
This is my autodiscovery message so far , but I’m unable to fill the blanks.
_config_msg_siren_json["expire_after"] = _expire_after;
_config_msg_siren_json["name"] = siren_name;
_config_msg_siren_json["command_topic"] = siren_command_topic;
_config_msg_siren_json["state_topic"] = siren_state_topic;
_config_msg_siren_json["availability_topic"] = _availability_topic;
_config_msg_siren_json["available_tones"][0] = "motion";
_config_msg_siren_json["available_tones"][1] = "smoke";
_config_msg_siren_json["payload_on"] = ;
_config_msg_siren_json["payload_off"] = ;
_config_msg_siren_json["state_on"] = ;
_config_msg_siren_json["state_off"] = ;
_config_msg_siren_json["state_value_template "] =;
_config_msg_siren_json["unique_id"] = siren_unique_id;
_config_msg_siren_json["device"]["identifiers"] = _client_id;
_config_msg_siren_json["device"]["name"] = _client_name;
_config_msg_siren_json["device"]["model"] = DEVICE_MODEL;
_config_msg_siren_json["device"]["sw_version"] = SOFTWARE_VERSION;
If someone could help me with the value template that would be great.