I tried using the time_date (https://home-assistant.io/components/sensor.time_date/). They populate but as little circles up top, not as the nice and neat layout/screen that is shown at the link. I followed the instructions. Help?
You have to put it Ănside a group
How?
The “group” instruction page isn’t terribly helpful, and I’ve searched Google for other resoureces (Youtube, etc), and frankly, they aren’t helpful either.
I’ve tried adding a group to configuration.yaml, but it doesn’t populate (following the not so great instructions I’ve found to so far). However, in the config file, there’s also a reference to a groups.yaml. I tried editing that, but all it did is create errors.
Try this inside your configuration.yaml file:
sensor:
- platform: time_date
display_options:
- 'time'
- 'date'
- 'date_time'
- 'time_date'
- 'time_utc'
- 'beat'
group:
date_and_time:
view: yes
icon: mdi:home
entities:
- group.date_time
date_time:
name: Date and Time
entities:
- sensor.time
- sensor.date
- sensor.date_time
- sensor.time_date
- sensor.time_utc
- sensor.beat
If you reference groups.yaml to an outside file put the group part inside that file.
If you need more help, please post your configuration.yaml
and groups.yaml
here. Don’t forget to use preformated text in your code when posting (use </>
symbol from reply box toolbar).
For what it’s worth, I didn’t create the reference groups.yaml file. I had seen that it appeared to arrive along with installing HA.
Anyway, I did as instructed but to no avail.
My config:
homeassistant:
# Name of the location where Home Assistant is running
name: Home
# Location required to calculate the time the sun rises and sets
latitude:
longitude:
# Impacts weather/sunrise data (altitude above sea level in meters)
elevation:
# metric for Metric, imperial for Imperial
unit_system: imperial
# Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
time_zone:
# Customization file
customize: !include customize.yaml
# Show links to resources in log and frontend
introduction:
# Enables the frontend
frontend:
# Enables configuration UI
config:
http:
# Uncomment this to add a password (recommended!)
api_password:
# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# base_url: example.duckdns.org:8123
# Checks for available updates
# Note: This component will send some information about your system to
# the developers to assist with development of Home Assistant.
# For more information, please see:
# https://home-assistant.io/blog/2016/10/25/explaining-the-updater/
updater:
# Optional, allows Home Assistant developers to focus on popular components.
# include_used_components: true
# Discover some devices automatically
discovery:
# Allows you to issue voice commands from the frontend in enabled browsers
conversation:
# Enables support for tracking state changes over time
history:
# View all events in a logbook
logbook:
# Track the sun
sun:
# Weather prediction
sensor:
- platform: yr
# Show Time
sensor:
- platform: time_date
display_options:
- 'time'
- 'date'
- 'date_time'
- 'time_date'
- 'time_utc'
- 'beat'
group:
date_and_time:
view: yes
icon: mdi:home
entities:
- group.date_time
date_time:
name: Date and Time
entities:
- sensor.time
- sensor.date
- sensor.date_time
- sensor.time_date
- sensor.time_utc
- sensor.beat
# Text to speech
tts:
- platform: google
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
you need to put your date and time group code in the groups.yaml
file that’s called by the third to last line of your configuration file. only declare the group
domain once. After you put the group code in the groups.yaml
file, remove that code from your configuration.yaml
file and reload HA.
Hi @anon2651294,
@squirtbrnr is right, cut the group part of the code and paste it inside groups.yaml. Don’t forget to reload HA.
I tried editing groups.yaml first, but there were a lot of errors. So I just tried putting them in config. I followed the above instructions and there were many errors. I’d post the errors here, but I can’t seem to figure out how to do it appropriately. If I use the indent, it just pastes a long string of text.
Try to disable the group include using #group: !include groups.yaml
and restart. Then post the errors.
Where are you seeing the errors? Do you see them in the HA log or did you use the configuration checker under the configuration side tab? Make sure when you copied the code into your groups.yaml
file you followed proper indentation for YAML.
@squirtbrnr when I used the checker under the config tab.
@j.assuncao it appears to have almost worked doing it your way (side note - I had managed to screw up the auto populate of my Wemos and my Hue lights before, but that also seems to have fixed itself). There are no errors for me to report from the config. But only three of the outputs show up in the group. The other three still show up at that top as badges.
Which ones show up in the group, also did you fix the sensor error you were getting?
@anon2651294 which are the ones that appear on the top and the ones inside the group? Are you sure that there are any other references to the sensors anywhere else? Can you please go to the left menu, click the <>
icon (current entities) and search for sensor.time
, sensor.date
, sensor.date_time
, sensor.time_date
and sensor.time_utc
? Do all this entities appear?
This is getting very strange… Lol…
@Spartan.II.117 - no, actually, there are still a couple sensor errors. However when I run the config check, it says no errors. But when you navigate to the “About” page, a few errors show up. I am not sure how I am supposed to copy/paste them here.
@Spartan.II.117 & @j.assuncao - time, date, and UTC show up in the group. Date & Time, Time & Date, and internet time show up as badges. All of the entities show up.
Also, now at the top, there’s “Home” and now a house. “Home” has welcome, lights, switches, etc. The house just has Date and Time. See attached.
Can you post your configuration in it’s entirety as it stands now?
So I figured out the sensor error. But not the group/badge bit.
Config as requested:
homeassistant:
# Name of the location where Home Assistant is running
name: Home
# Location required to calculate the time the sun rises and sets
latitude:
longitude:
# Impacts weather/sunrise data (altitude above sea level in meters)
elevation:
# metric for Metric, imperial for Imperial
unit_system: imperial
# Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
time_zone:
# Customization file
customize: !include customize.yaml
# Show links to resources in log and frontend
introduction:
# Enables the frontend
frontend:
# Enables configuration UI
config:
http:
# Uncomment this to add a password (recommended!)
api_password:
# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# base_url: example.duckdns.org:8123
# Checks for available updates
# Note: This component will send some information about your system to
# the developers to assist with development of Home Assistant.
# For more information, please see:
# https://home-assistant.io/blog/2016/10/25/explaining-the-updater/
updater:
# Optional, allows Home Assistant developers to focus on popular components.
# include_used_components: true
# Discover some devices automatically
discovery:
# Allows you to issue voice commands from the frontend in enabled browsers
conversation:
# Enables support for tracking state changes over time
history:
# View all events in a logbook
logbook:
# Track the sun
sun:
# Weather prediction
sensor:
- platform: time_date
display_options:
- 'time'
- 'date'
- 'date_time'
- 'time_date'
- 'time_utc'
- 'beat'
group:
date_and_time:
view: yes
icon: mdi:home
entities:
- group.date_time
date_time:
name: Date and Time
entities:
- sensor.time
- sensor.date
- sensor.date_time
- sensor.time_date
- sensor.time_utc
- sensor.beat
# Text to speech
tts:
- platform: google
#group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
hi @anon2651294.
You can remove the “Welcome home!” message commenting the line introduction:
. It just takes space.
The house icon is created by the group date_and_time
with icon: mdi:home
. You can change that.
I can’t see anything wrong in your configuration so my best bet is that yous system is getting Date & Time, Time & Date, and Internet time from another component. Don’t know if that is even possible. Try to change the order of date_time
group to:
date_time:
name: Date and Time
entities:
- sensor.beat
- sensor.time_utc
- sensor.time
- sensor.time_date
- sensor.date
- sensor.date_time
Do the same sensors appear on the same place? time, date, and UTC show up in the group, Date & Time, Time & Date, and internet time show up as badge?
One other thing, What do you have inside customize.yaml
?
This is very strange @bankerjoe… What is you setup? If you search for sensor.time_date
, sensor.date_time
and sensor.beat
how many time do they appear on Current Entities list of Developer Tool under the column Entity?
@j.assuncao actually, it appears to be none in the Entities list. All three only show up in the attributes list.
That said, sensor.date__time and sensor.time__date show up (as in two underscores).
I doubled checked my config, and they are written in with only one underscore.
In the logbook, Time & Date, Date & Time, and Internet time all show up to be changed at regular intervals.