Love this video - I have routinely come back every 4 or 5 months since you've released it as a refresher. Would love to see another masterclass with the new templating options HA has. Thanks for everything you do!!!
Awesome job. This is one of your best videos and it is packed with great content. Great way of teaching templates and coding breakdown for understanding contextually
Thank you for your effort. It addressed exactly the questions I was struggling with. It gave me the "concept" around templates. Without that I was lost, thanks to your video I was able to succeed.
@@SmartHomeMakers Well, thanks to your explanation of setting variables, I was finally able to figure out how to create a sensor that would show me the last command issued to any of my Alexa voice assistants. {% set last_alexa = expand('group.voice_assistants') | selectattr('attributes.last_called','eq',true) | map(attribute='entity_id') | first %} {{ last_alexa }} {{ state_attr(last_alexa,'last_called_summary') }}
@@SmartHomeMakers Thanks! So, I actually just wanted to display the last Alexa command in Lovelace, but I'm thinking about attempting to use it to build an automation for context-sensitive voice control of curtains, blinds and TVs, i.e. if I'm in the lounge and say "Alexa, open curtains", my automation will know I want the lounge curtains because the command originated from the lounge Echo - I don't have to say "Alexa, open the lounge curtains" Make sense? Not sure how I achieve this though. Currently, I'm using a separate automation for each different TV, blind, and curtain, which is a bit complicated.
Very good tutorial, though I have been using HA for a while now, I haven’t used templates much, this video surely will help me in reducing my configuration yamls a lot :)
Great video that I've referred to many times over the last few months. Many thanks. Have you made any videos on using regular expressions in templates? I can't find any and the HA Templating docs are a little light on real world examples.
Thank you for this. I was looking for a way to parse variables to convert the 24hr time format to a 12hr that can be spoken by my Alexa device. This should work perfectly.
Is it possible to do functions/methods in Home Assistant? I am working on my script and I want to get the month name from the date variable. I want to create a function within the template that I can pass the month integer to and it returns the month name by either using IF statements or a Switch Case.
Good tutorial I learned a lot ! But how do I assign/set a value TO an entity.state ? Fx. I have a Number Helper that I want to assign a state value, because I need the stored value in other calculations later on ?! Or are there an other way to store values ? Thank you.
Brilliant video. Very clear. I learned lots from this video. Thanks a lot. Just have a question: How do we use global variants in templates? For example: - binary_sensor: - name: "On fire" state: > {% set AlarmTemp = 50 %} ..... attributes: test: "{{ AlarmTemp }}" I define AlarmTemp in "state", and want to access AlarmTemp's value from "attributes".
Great tutorial, thank you. I am, however, running into a few syntax issues: What version of HA was this video made for? Has HA made some syntax changes since this video was released? For example, I get errors with: {% for state in states.sensor | selectattr('attributes.device_class','==','temperature') %} However, this works: {% for state in states.sensor | selectattr('attributes.device_class','defined') | selectattr('attributes.device_class','==','temperature') %} Also "unknown" errors with this: {{ states('sensor.date') }} Is there new syntax for HA Templates in 2023.6.3?
Very nice tutorial! But I'm trying to figure out how to use your examples. The list of temperatures, how would you view them in Lovelace? There is no card that will display the output of a template, right? What exactly do you use these text list templates FOR?
Hi and thanks for the nice video. I can't get the {{ state_attr('sensor.aqara_temp_humidity_sensor_temperature','temperature')}} to show the temperature I only get null as response. any idea why? tested with aqara and hue sensor.
As a javascript developer, if I want to dive into coding custom layouts and designs for lovelace(as an example) does this cover everything I need to know? Thanks!
@@SmartHomeMakersThanks! I've done more research and it looks like I need to learn more about jinja to better manipulate devices and entities and then I can pass it to my card design that I create in JS. Is there a list of functions that we can call in HA in the templating development area? I'm sure there are more than state_attr() or others you've mentioned in the video...
Question: In the example you used for ground temp you used {% %} for the variables and then used {{ }} for the statement which I understand completely. I also understand you could have also listed all the variables and the math completely in the statement itself. So my question is, what’s the difference if any and or the pros and cons to doing it the 2 different ways. I have a template sensor that reports a room temp based on multiple temp sensor sources in the same room, but have simply listed all the sensors and the math in one statement and never considered doing in any differently? Thanks for the great videos and if you don’t mind me saying they are getting better with each and every one 😉
Just how easy it is to read, when doing these videos and sharing code sometimes I need to break things down a bit. Also good to verify your math as you go along
Great Video, Was wondering is it possible to change 2 "items" of a sensor with templating. I know you can change the icon based on the state, you can also change the color of the icon. How would you change both?
@@SmartHomeMakers - ```{% elif is_state('sensor.tv_state','player') %} {{ 'mdi:alpha-b-circle-outline' }}``` but want the icon mdi:alpha-b-circle-outline to be blue. Its now, same check but two changes
I have a large and complex template that I use in several automations. can i put that in a yaml file and referance it in an automation? the purpose is to only have to change it once for all of them.
Hi thanks for your good videos, I'm sitting now trying to make a template that mimics what is displayed when a timer has started it looks like you are using finishes_at: 2022-01-14T13: 50: 02 + 00: 00 from which to subtract now (), but how
Thanks for this, very helpful, Questions: You mentioned that the > was needed to use multiple lines. Great this is the kind of syntax info I can't seem to locate. But in the same screen 2 lines of code used {%- what is the minus for in this use case? Then when you showed us your occupancy sensor, after the "icon_template: >-" the >- was used what is the - for in that case? These are the things that perplex me as much as anything. Thanks again
Great question Rick! I'm not sure myself, I have tried to omit it and get the same result, will continue to research, hopefully someone from the community can jump on and answer your question!
Even though I have used them, I do noit understand what the triple square brackets are used for when creating IF statemets. Could someone point me in the right direction.? Thanks.
Hi, thanks for another great video ! A quick question: you used all this code inside the developer tools template area, but is it possible to use it inside the Raw Configuration Editor of the dashboards, ou inside the Code Editor of the cards ?
Thank you Leonardo, fantastic job. Can you help me with this please: If I write {{ states.light.0xa4c138eec7b6bc21 }} the template is listening to light.11871832690929351713. Of course, light.11871832690929351713 thoes not exist, so the answer is none. ¿Why jinja converts to decimal the entity name, and how can I make it work?
@@SmartHomeMakers Well, all my Zigbee devices (Zigbee2mqtt) has names like that, and all my automations uses this device names, so I prefere not to change it if possible.
@24:00 "..and then we will _combat_ all of this..." What?? The CC says 'combat' but I _think_ you said 'compare'. But the '|' is a pipe, and doesn't compare anything. And the '(-1)' after it is totally baffling. Could someone explain exactly what this is doing?
Took some tinkering, but this seems to work. Inside Average Temperature {{ (inside_temperature) | round(0) }} or Inside Average Temperature {{ (inside_temperature) | int }}
Great course …. unfortunately the „Thanks“ button is not working. I tried to contribute … but it doesn’t work. Can you check that or give me another way to contribute . (perhaps via PP)
@@SmartHomeMakers Ok, I did. it via another video. But I have a question left: How do you implement a template, that gives you the value i.e. of a voltage reading. {{ states('sensor.sonoff_100033223e_voltage') }} into a custom button card, (switch) to replace either the name or the status. Goal is, to show this voltage value in a CBC that switches another sensor either by replacing ‚status‘ or ‚name‘ of that card. That was ( for me) missing in that tutorium, to make it perfect. But thanks again, I appreciate you’re video and I’ve learned a lot.
Hi: Inspires for your amazing video I've tried my first experience on templating .The idea is to manage the information from my fronius solar inverter .I built the sensor templates attached but I can't found them a s entities .Any idea of what I'm missing . template: - sensor: - name: grid_energy_fronius unit_of_measurement: 'kWh' value_template: "{{ (states('sensor.energy_real_consumed_fronius_meter_0_192_168_30_210') | float ) / 1000 }}" icon_template: mdi:grid-power state_class: total_increasing - name: produced_energy_fronius unit_of_measurement: 'kWh' value_template: "{{ (states('sensor.energy_real_produced_fronius_meter_0_192_168_30_210') | float ) / 1000 }}" icon_template: mdi:solar-power state_class: total_increasing - name: dif_prod_consumo_fronius unit_of_measurement: "W" state: > {% set prod = states('sensor.power_photovoltaics_fronius_power_flow_0_192_168_30_210') | float %} {% set consumo = states('sensor.power_load_fronius_power_flow_0_192_168_30_210') | float %} {{ ((prod + consumo) ) | round(1) }} state_class: total_increasing
I don’t know if I am the only one who says: too much input way too fast! Teaching templates on real problems with increasing complexity would be, what I need.
Thank you for this video. I am really struggling trying to reference values from a device. I have downloaded the json file of a z-wave device but my attempt to reference for example the door code like this return none. Can you shed any insight on what I may be doing wrong? Thank you! ("value","new value" changed for privacy) {{ state_attr('lock.front_door_lock','4-99-0-userCode-3)}} yields "None" snippet from json: { "id": 4, "name": "Front Door Lock", "loc": "Living Room", "values": [ {.. .. { "id": "4-99-0-userCode-3", "nodeId": 4, "toUpdate": false, "commandClass": 99, "commandClassName": "User Code", "endpoint": 0, "property": "userCode", "propertyName": "userCode", "propertyKey": 3, "propertyKeyName": "3", "type": "string", "readable": true, "writeable": true, "label": "User Code (3)", "stateless": false, "commandClassVersion": 1, "minLength": 4, "maxLength": 10, "list": false, "value": "yyyy", "lastUpdate": 1708819929286, "newValue": "xxxx" },
I'm having the following template state_attr('sensor.waqi_pusa_delhi_delhi_india','time') that results in 2023-10-21 07:00:00+05:30 How do I pull the hour digit out of it ? I was using the split function until now and it was working well but after recent HA update, it broke and now that split function is no longer working..Can you help ?
Guys, i've a problem, i'm using this in the template editor {{ state_attr('sensor.transmission_started_torrents','torrent_info') }} and my result is this: { "Camp.X-Ray.2014.720p.Blu-ray.DD5.1.x264.RoSubbed-playHD": { "added_date": 1656844965, "percent_done": "0.00", "status": "downloading", "id": 92 } } How can i twist it in order to show me only the name of the movie?
Love this video - I have routinely come back every 4 or 5 months since you've released it as a refresher. Would love to see another masterclass with the new templating options HA has. Thanks for everything you do!!!
Great suggestion!
We appreciate the time you spend to make this video. Very informative. Thank you!
Thanks a lot for your appreciation !
Your channel deserves WAY more subscribers!!!
Appreciate your support!
Awesome job. This is one of your best videos and it is packed with great content. Great way of teaching templates and coding breakdown for understanding contextually
Thanks Cupertino! Appreciate your kind words! I hope I can pull off another gem in the near future
Thank you for your effort. It addressed exactly the questions I was struggling with. It gave me the "concept" around templates. Without that I was lost, thanks to your video I was able to succeed.
Thanks Bruno for the kind words! Feel free to share this video so it can help more people :)
Thank you for sharing your knowledge. Even for people non English mother tongues, your explanations are crystal clear. Grazie!!
Thanks Horacio, where do you come from? :)
@@SmartHomeMakers Citizen of the world ... I was born in Argentina but but I have lived in Italy for 20 years
@@horaciomonaco6843are you happy Argentina are in the final of the World Cup?
@@SmartHomeMakers Yes, of course I am ... but I always keep in mind that it's just a game 🙂
Well done, Gio. Templates are now sinking in, at last!
Thanks Ash! Appreciate it!
Excellent tutorial I have learnt a lot - thank you 👍🏻
Glad it was helpful!
Really good course on templating! Thank you!
Thank you, this makes templates more approachable.
Thanks Tomasz, glat I was able to help
Thanks, I'm a frequent flyer here. Learning a lot every time.
Are you watching the videos offline with premium?
@@SmartHomeMakers Don't think so. Why do you ask? ;)
@@TheNico9870 I thought you were watching the videos offline :)
Absolutely fantastic tutorial!
Thanks so much Boomsig!
Thank you so much, really informative!
You're very welcome!
Thanks for the good explanation! 👍
Hey Kris, My pleasure!
Dude, thank you for making this video. Really great and has helped me understand templating a lot.
Appreciate your comment Ben, which part did you enjoy the most ?
@@SmartHomeMakers Well, thanks to your explanation of setting variables, I was finally able to figure out how to create a sensor that would show me the last command issued to any of my Alexa voice assistants.
{% set last_alexa = expand('group.voice_assistants') | selectattr('attributes.last_called','eq',true) | map(attribute='entity_id') | first %}
{{ last_alexa }}
{{ state_attr(last_alexa,'last_called_summary') }}
@@BenGmuN Very smart! and which automations are you building from this sensor?
@@SmartHomeMakers Thanks! So, I actually just wanted to display the last Alexa command in Lovelace, but I'm thinking about attempting to use it to build an automation for context-sensitive voice control of curtains, blinds and TVs, i.e. if I'm in the lounge and say "Alexa, open curtains", my automation will know I want the lounge curtains because the command originated from the lounge Echo - I don't have to say "Alexa, open the lounge curtains" Make sense? Not sure how I achieve this though. Currently, I'm using a separate automation for each different TV, blind, and curtain, which is a bit complicated.
Fantastic video.
Thanks a lot!
Wow. You got me flying. My HA has just gone into orbit!
Thanks Julian!!
very useful video, thank you
Glad it was helpful!
Nice walkthrough and good tempo #smarthomemakers!
Thanks Jaz!
GREAT Work! Keep them coming!
Thanks Nuno!
Thanks for this video,, i learned a lot from it.
Thanks Hendrik!
This was fantastic, thank you!!
Glad you enjoyed it!
Cool video, thanks! But please learn what an "operand" is: In "a+b", "a" and "b" are the operands, and "+" is the operator!
Thanks Colin for pointing out my mistake!
Very good tutorial, though I have been using HA for a while now, I haven’t used templates much, this video surely will help me in reducing my configuration yamls a lot :)
Appreciate your support!
This is one of the best videos for learning templating. Thank you! However, some code is not working anymore, perhaps due to updates.
Thanks Mark for the heads up!
Excellent GOOD!
Thanks!!
Thanks!
Thank you soo much Nathan!!!!!
Great video that I've referred to many times over the last few months. Many thanks.
Have you made any videos on using regular expressions in templates? I can't find any and the HA Templating docs are a little light on real world examples.
Hey Mike! What are you trying to achieve ? :)
Thank you for this. I was looking for a way to parse variables to convert the 24hr time format to a 12hr that can be spoken by my Alexa device. This should work perfectly.
Glad it was helpful!
Is it possible to do functions/methods in Home Assistant? I am working on my script and I want to get the month name from the date variable. I want to create a function within the template that I can pass the month integer to and it returns the month name by either using IF statements or a Switch Case.
Good tutorial I learned a lot ! But how do I assign/set a value TO an entity.state ? Fx. I have a Number Helper that I want to assign a state value, because I need the stored value in other calculations later on ?! Or are there an other way to store values ? Thank you.
great information would you have a sample template for adding how many lights have a state = on
Yep in this video!
Brilliant video. Very clear. I learned lots from this video. Thanks a lot.
Just have a question: How do we use global variants in templates?
For example:
- binary_sensor:
- name: "On fire"
state: >
{% set AlarmTemp = 50 %}
.....
attributes:
test: "{{ AlarmTemp }}"
I define AlarmTemp in "state", and want to access AlarmTemp's value from "attributes".
Hi Dong! You can create your own sensor in the configuration.yaml and refer to it!
@@SmartHomeMakers Yeah, I found the way. Thanks a lot.
Nice video!
Glad you enjoyed it Jose!
Great tutorial, thank you. I am, however, running into a few syntax issues:
What version of HA was this video made for?
Has HA made some syntax changes since this video was released?
For example, I get errors with:
{% for state in states.sensor | selectattr('attributes.device_class','==','temperature') %}
However, this works:
{% for state in states.sensor | selectattr('attributes.device_class','defined') | selectattr('attributes.device_class','==','temperature') %}
Also "unknown" errors with this:
{{ states('sensor.date') }}
Is there new syntax for HA Templates in 2023.6.3?
Hello! I think this video now might be a year old :) Can't remember which version it was!
Very nice tutorial! But I'm trying to figure out how to use your examples. The list of temperatures, how would you view them in Lovelace? There is no card that will display the output of a template, right? What exactly do you use these text list templates FOR?
Hi Steve! In my latest video I showcase how to use the markdown card and a for loop
@@SmartHomeMakers by coincidence I just did this myself. But mark down is finicky!
Thanks
Thanks Andy!!! happy new year!!!
Hi and thanks for the nice video. I can't get the {{ state_attr('sensor.aqara_temp_humidity_sensor_temperature','temperature')}} to show the temperature I only get null as response. any idea why? tested with aqara and hue sensor.
Have you got the correct entity name ?
Have you got the correct entity name ?
As a javascript developer, if I want to dive into coding custom layouts and designs for lovelace(as an example) does this cover everything I need to know?
Thanks!
More about jinja templating Spencer!
@@SmartHomeMakersThanks! I've done more research and it looks like I need to learn more about jinja to better manipulate devices and entities and then I can pass it to my card design that I create in JS. Is there a list of functions that we can call in HA in the templating development area? I'm sure there are more than state_attr() or others you've mentioned in the video...
Question: In the example you used for ground temp you used {% %} for the variables and then used {{ }} for the statement which I understand completely. I also understand you could have also listed all the variables and the math completely in the statement itself. So my question is, what’s the difference if any and or the pros and cons to doing it the 2 different ways. I have a template sensor that reports a room temp based on multiple temp sensor sources in the same room, but have simply listed all the sensors and the math in one statement and never considered doing in any differently? Thanks for the great videos and if you don’t mind me saying they are getting better with each and every one 😉
Just how easy it is to read, when doing these videos and sharing code sometimes I need to break things down a bit. Also good to verify your math as you go along
How do you handle your config.yaml do you split everything up or keep it all on one.
Used to split when HA was more yaml based, if you are a dev it would come natural
I'd say templating and Node Red are top on my list of things to master this year! Great video!
There is always going to be a lot to learn :) I guess that is part of the fun
Great Video,
Was wondering is it possible to change 2 "items" of a sensor with templating. I know you can change the icon based on the state, you can also change the color of the icon. How would you change both?
Potentially if they are stored in different key value pairs
@@SmartHomeMakers - ```{% elif is_state('sensor.tv_state','player') %}
{{ 'mdi:alpha-b-circle-outline' }}``` but want the icon mdi:alpha-b-circle-outline to be blue.
Its now, same check but two changes
I have a large and complex template that I use in several automations. can i put that in a yaml file and referance it in an automation? the purpose is to only have to change it once for all of them.
Hi Jason! Yes you can put it into a script
Hi thanks for your good videos, I'm sitting now trying to make a template that mimics what is displayed when a timer has started it looks like you are using
finishes_at: 2022-01-14T13: 50: 02 + 00: 00
from which to subtract now (), but how
Make part 2. You show a lot used in Developer Tools. Show more (if possible) integrated in automations en in dashboards
Hi Re Be, what would you like to see in part 2 specifically ?
Thanks for this, very helpful, Questions: You mentioned that the > was needed to use multiple lines. Great this is the kind of syntax info I can't seem to locate. But in the same screen 2 lines of code used {%- what is the minus for in this use case? Then when you showed us your occupancy sensor, after the "icon_template: >-" the >- was used what is the - for in that case? These are the things that perplex me as much as anything. Thanks again
Great question Rick! I'm not sure myself, I have tried to omit it and get the same result, will continue to research, hopefully someone from the community can jump on and answer your question!
@@SmartHomeMakers isn’t it to trim white space in any generated output?
Even though I have used them, I do noit understand what the triple square brackets are used for when creating IF statemets. Could someone point me in the right direction.? Thanks.
Do you mean the triple curly brackets? It is part of the syntax to highlight we are using a reserved word (if)
Great!
Thanks Victor!
Hi, thanks for another great video ! A quick question: you used all this code inside the developer tools template area, but is it possible to use it inside the Raw Configuration Editor of the dashboards, ou inside the Code Editor of the cards ?
Yes it is, remember that sometimes it can become difficult to debug code and get it write.
Thank you Leonardo, fantastic job. Can you help me with this please:
If I write {{ states.light.0xa4c138eec7b6bc21 }} the template is listening to light.11871832690929351713. Of course, light.11871832690929351713 thoes not exist, so the answer is none. ¿Why jinja converts to decimal the entity name, and how can I make it work?
that look like a weird name for an entity, could you rename it? :)
@@SmartHomeMakers Well, all my Zigbee devices (Zigbee2mqtt) has names like that, and all my automations uses this device names, so I prefere not to change it if possible.
@24:00 "..and then we will _combat_ all of this..." What?? The CC says 'combat' but I _think_ you said 'compare'. But the '|' is a pipe, and doesn't compare anything. And the '(-1)' after it is totally baffling. Could someone explain exactly what this is doing?
Why do I get "none" for every one of my sensors? No matter which, it's always a value of "none" what am I missing?
the round function at the 17:47 mark is not working for me.
Took some tinkering, but this seems to work.
Inside Average Temperature {{ (inside_temperature) | round(0) }}
or
Inside Average Temperature {{ (inside_temperature) | int }}
@40:12 how to filter list results ?
have you tried the pipe | ?
does any one know of a way to have a sensor only change state when the condition has been met for a specified amount of time
good question, did you find out?
Great course …. unfortunately the „Thanks“ button is not working. I tried to contribute … but it doesn’t work.
Can you check that or give me another way to contribute . (perhaps via PP)
Awesome! Appreciate your support, you can find buy me a coffee links if not can send over PayPal
@@SmartHomeMakers
Ok, I did. it via another video.
But I have a question left: How do you implement a template, that gives you the value i.e. of a voltage reading.
{{ states('sensor.sonoff_100033223e_voltage') }}
into a custom button card, (switch) to replace either the name or the status.
Goal is, to show this voltage value in a CBC that switches another sensor either by replacing ‚status‘ or ‚name‘ of that card.
That was ( for me) missing in that tutorium, to make it perfect.
But thanks again, I appreciate you’re video and I’ve learned a lot.
Hi: Inspires for your amazing video I've tried my first experience on templating .The idea is to manage the information from my fronius solar inverter .I built the sensor templates attached but I can't found them a s entities .Any idea of what I'm missing .
template:
- sensor:
- name: grid_energy_fronius
unit_of_measurement: 'kWh'
value_template: "{{ (states('sensor.energy_real_consumed_fronius_meter_0_192_168_30_210') | float ) / 1000 }}"
icon_template: mdi:grid-power
state_class: total_increasing
- name: produced_energy_fronius
unit_of_measurement: 'kWh'
value_template: "{{ (states('sensor.energy_real_produced_fronius_meter_0_192_168_30_210') | float ) / 1000 }}"
icon_template: mdi:solar-power
state_class: total_increasing
- name: dif_prod_consumo_fronius
unit_of_measurement: "W"
state: >
{% set prod = states('sensor.power_photovoltaics_fronius_power_flow_0_192_168_30_210') | float %}
{% set consumo = states('sensor.power_load_fronius_power_flow_0_192_168_30_210') | float %}
{{ ((prod + consumo) ) | round(1) }}
state_class: total_increasing
What is templating?
Im curious about the history of templating. Did it start along side linux or was it even earlier than that?
Hi Manuel! A way to do simple home assistant logic similar to a programming language
@@WiseInetellect Hi Kobi! Good question do you mean the jinja2 initiative ?
This is fantastic stuff
Very interesting, but the background music is horrific. Do you have music running in the back ground when you're in a class room?
Just gave up 🤬
Appreciate you taking the time to giving me feedback! Sorry about the music
I don’t know if I am the only one who says: too much input way too fast! Teaching templates on real problems with increasing complexity would be, what I need.
Thanks for your feedback
Thank you for this video. I am really struggling trying to reference values from a device. I have downloaded the json file of a z-wave device but my attempt to reference for example the door code like this return none. Can you shed any insight on what I may be doing wrong? Thank you! ("value","new value" changed for privacy)
{{ state_attr('lock.front_door_lock','4-99-0-userCode-3)}} yields "None"
snippet from json:
{
"id": 4,
"name": "Front Door Lock",
"loc": "Living Room",
"values": [
{..
..
{
"id": "4-99-0-userCode-3",
"nodeId": 4,
"toUpdate": false,
"commandClass": 99,
"commandClassName": "User Code",
"endpoint": 0,
"property": "userCode",
"propertyName": "userCode",
"propertyKey": 3,
"propertyKeyName": "3",
"type": "string",
"readable": true,
"writeable": true,
"label": "User Code (3)",
"stateless": false,
"commandClassVersion": 1,
"minLength": 4,
"maxLength": 10,
"list": false,
"value": "yyyy",
"lastUpdate": 1708819929286,
"newValue": "xxxx"
},
I'm having the following template
state_attr('sensor.waqi_pusa_delhi_delhi_india','time')
that results in
2023-10-21 07:00:00+05:30
How do I pull the hour digit out of it ? I was using the split function until now and it was working well but after recent HA update, it broke and now that split function is no longer working..Can you help ?
Guys, i've a problem, i'm using this in the template editor
{{ state_attr('sensor.transmission_started_torrents','torrent_info') }}
and my result is this:
{
"Camp.X-Ray.2014.720p.Blu-ray.DD5.1.x264.RoSubbed-playHD": {
"added_date": 1656844965,
"percent_done": "0.00",
"status": "downloading",
"id": 92
}
}
How can i twist it in order to show me only the name of the movie?
is the name of the movie Camp X ?
@@SmartHomeMakers that's correct
Thanks it helped me a lot.
Thanks Frans for watching !