Page 1 of 2
Dashboard - Week tracking
Posted: Tue Jul 07, 2020 11:26 am
by dirkdiggler147
Can anyone point me in the right direction for this?
I want to add an area to the dashboard that would indicate what week of the grow I am on and maybe any other related information.
Thanks!
Edit:
I managed to create a helper to hold the Grow Start date using input_datetime.grow_start I also have a script with calls a service input_datetime.set_datetime, I then added a button to the overview page to run the script and added the grow_start entity to the page also.
When I click the button it does not update the date though. Can anyone point me in the right direction?
I have also tried this from the script:
Code: Select all
alias: Set Grow Start
sequence:
- data_template:
datetime: "{{ now().strftime('%Y-%d-%m') }}"
entity_id: input_datetime.grow_start
service: input_datetime.set_datetime
Got it working:
Code: Select all
alias: Set Grow Start
sequence:
- data:
datetime: '2016-04-20'
entity_id: input_datetime.grow_start
service: input_datetime.set_datetime
Re: Dashboard - Week tracking
Posted: Tue Jul 07, 2020 4:25 pm
by LEDG
Good stuff. Mine looks like this:
Below are the entries in my configuration.yaml:
Code: Select all
input_datetime:
grow_start_date:
name: Grow Start Date
has_date: true
has_time: false
Code: Select all
- platform: template
sensors:
days_since_grow_start:
friendly_name: "Days Since Grow Start"
icon_template: mdi:calendar
value_template: '{{ ((as_timestamp(now()) - (states.input_datetime.grow_start_date.attributes.timestamp)) | int /60/1440) | round(0) }}'
entity_id: input_datetime.grow_start_date,sensor.time
current_week_of_grow:
friendly_name: "Current Week of Grow"
icon_template: mdi:calendar
value_template: '{{ ((as_timestamp(now()) - (states.input_datetime.grow_start_date.attributes.timestamp)) | int /60/1440//7 +1) | round(0) }}'
entity_id: input_datetime.grow_start_date,sensor.time
Code: Select all
- platform: time_date
display_options:
- 'time'
- 'date'
Re: Dashboard - Week tracking
Posted: Tue Jul 07, 2020 6:09 pm
by dirkdiggler147
That's awesome, exactly what I was looking for
@LEDG
Thanks for posting!
By the way when is the next video up
Re: Dashboard - Week tracking
Posted: Tue Jul 07, 2020 10:36 pm
by LEDG
dirkdiggler147 wrote: ↑Tue Jul 07, 2020 6:09 pm
That's awesome, exactly what I was looking for @LEDG
Thanks for posting!
By the way when is the next video up
4 hours ago!
I think adding another date input and sensor to track when you flipped to flower and how long it's been since then would be helpful for a lot of people too.
Re: Dashboard - Week tracking
Posted: Tue Jul 07, 2020 10:51 pm
by dirkdiggler147
@LEDG
Wow that was quick, parts 2 and 3 up already!
I followed the guide in pt2 but for some reason I don't see all the tabs that you have in the Devloper Tools, I don't see Logs and MQTT. Any idea why that might be?
Also when I look at MQTT in the integrations section it still has an option to configure.
Thanks
Re: Dashboard - Week tracking
Posted: Wed Jul 08, 2020 12:45 pm
by LEDG
Lol, I went to check this myself and it must have just changed with a recent update. This functionality is now contained within the mqtt integration. If you click configure, you can now do the MQTT testing in there, rather than in the dev tools. Thanks for pointing this out.
Re: Dashboard - Week tracking
Posted: Sat Oct 03, 2020 7:08 pm
by Reeper13
Hi
I am having Trouble figuring out where to put the code
I put all of them in Configuration.yaml and get the following error
bad indentation of a mapping entry
incomplete explicit mapping pair; a key node is missed
Please help an Idiot
Re: Dashboard - Week tracking
Posted: Sun Oct 04, 2020 2:05 pm
by Gromyjoe
check spacing, it takes some getting use to but having one thing out of place can mess everything up.
Re: Dashboard - Week tracking
Posted: Mon Oct 05, 2020 2:55 pm
by Gromyjoe
Im thinking about using this as a trigger for my lights, but when i use the "input_datetime" helper it never triggers at the time i set. I think I need a template to compare the time of the helper to current time.. cant find one though
Re: Dashboard - Week tracking
Posted: Fri Oct 23, 2020 1:04 pm
by Gromyjoe
Theres an app for android (and probably iphone) called todo list. You can create daily checklists and chores, add a schedule for the bloom phase, ect ect. I have a few items on the app, copied the api to the configuration.yaml. then like magic they appear in the calendar entity!