This means that we are using their syntax and make some custom home assistant variables available to templates during.
Home assistant sensor template.
The state of a template binary sensor can only be on or off.
For example if you have a garage door with a toggle switch that operates the motor and a sensor that allows you know whether the door is open or closed you can combine these into a switch that knows whether the garage door is open or closed.
Sun is up value template.
This component is only for numeral states.
Otherwise the initial state will be undefined.
State.
This mqtt sensor platform uses the mqtt message payload as the sensor value.
The template platform supports binary sensors which get their values from other entities.
The template platform creates switches that combines components.
Adding the following to your configuration yaml file will create two sensors one for the current sun angle and one for the time of the next sunrise.
Importing attributes is currently not supported but you can create template sensors in home assistant that return the attribute of a sensor and then import the template sensor here.
Example configuration yaml entry sensor.
If you want to import arbitrary text states from home assistant use the home assistant text sensor.
To use your mqtt sensor in your installation add the following to your configuration yaml file.
The template platform supports sensors which get their values from other entities.
Example configuration yaml entry binary sensor.
Here is an example of adding a template binary sensor to the configuration yaml file.
The configuration of template sensors depends on what you want them to be.