Sorry, I should have been more clear; Idle is just a casing problem. It’s currently all lower case.
Oh OK. That’s a simple one for me to sort out then.
It’s also what happens when you adjust the code slightly when using your mobile phone.
Ha! I thought I was taking risks by replying to this topic on my mobile phone!
2022.3.2b1
is out…
- Add support for tuner sensors
- Fix case and labels for tuner sensors
- Allow changing the sensor format when the tuner is active (available formats are documented in the README; default is just the channel name)
- Update README to reflect tuner sensors
Ensure HACS is looking for beta versions.
Feedback welcomed.
Works perfectly! I’m just going to throw a template sensor over the top of the tuner sensor so that I can replace the icon with channel logos as I’ve done in the past with the rest sensors.
Amazing work, thank you!
What name format do you use for your icons? I could probably add an option for you to configure a path, which would let the integration build the entity_picture
property for you.
@WhimsySpoon - actually no template sensor is required. This makes use of auto-entities card and template-entity-row (ignore the image, I just put a random one in for testing). Obviously change the path to match yours.
type: custom:auto-entities
card:
type: entities
filter:
include:
- domain: sensor
entity_id: /hdhomerun.*tuner\d+$/
options:
type: custom:template-entity-row
image: >
{% if states(config.entity) | lower not in ("idle", "in use", "scanning") %}
/local/update_icons/{{states(config.entity) | lower}}.png
{% endif %}
name: |
{% if state_attr(config.entity, "friendly_name") is not none %}
{{ state_attr(config.entity, "friendly_name").split(":")[1] | title }}
{% endif %}
secondary: |
{% if state_attr(config.entity, "friendly_name") is not none %}
{{ states[config.entity].last_changed | relative_time }}
{% endif %}
That works perfectly! Thanks again!
Just thinking about how much better an option this would be as it would mean using the icons in various places in Lovelace without needing the extra code.
Would love to help contribute on this. It could finally be the project that forces me to learn Python!
It’s not coming up on hacs for me. Do I need to add your repo or should it be there by default.
Yes, it needs to be added as a custom repo. The latest version will need beta enabled.
Just updated the YAML in this post. It was causing some warnings to appear so I’ve guarded against the entities not being ready yet.
It shouldn’t take me too long to do it. I’ll try and take a look tomorrow.
2022.3.2b2
is out…
- Add support for tuner sensors
- Fix case and labels for tuner sensors
- Allow changing the sensor format when the tuner is active (available formats are documented in the README; default is just the channel name)
- Set entity categories
- Add the ability to configure entity images (see README for configuration)
- Update README to reflect tuner sensors
Ensure HACS is looking for beta versions.
Feedback welcomed.
Using 2022.3.2b2
you can now use the following in a card to get the desired effect.
N.B. To get friendlier names you can just change the name of the entity as you would do for any other entity.
type: custom:auto-entities
card:
type: entities
filter:
include:
- domain: sensor
entity_id: /hdhomerun.*tuner\d+$/
Amazing update. I’ve just installed the beta and provided a path to the logos. When I tune a channel, the logo changes to an empty space but doesn’t show the actual logo. I’ve used the path format specified in the readme.
Is it looking for png
files? Also, are the file names case sensitive?
Yup. They should be the channel names in all lowercase. So in my case I put /local/update_icons
in the configuration options for the path. I had a file in there named bbc two.png
and that is what was displayed.
I think I was being impatient, it was possibly still downloading the images. I’ve just tried it again and it’s working perfectly.
Great update, thank you!
2022.3.2
is now out as there was no additional work needed on the betas.
@uvjim any chance of a Buy Me A Coffee link (or similar) so I can properly thank you for your efforts?
I do not. As cheesy as it may sound, the fact that someone else is getting use out of it is enough for me.
Oddly enough I really don’t use the HDHomeRun devices as much as I should (I have a Connect and a Quatro). I may have to start using them more now.
I only built this as I’ve been trying to get HASS to be a central place of telling me about updates that are needed at home.
Thanks for the offer though. It is much appreciated.