Dashboard - Week tracking

Home Assistant automation projects, questions, etc. go here.
dirkdiggler147
LED-Curious
LED-Curious
Reactions:
Posts: 20
Joined: Fri Jun 12, 2020 9:52 pm

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
User avatar
LEDG
Site Admin
Reactions:
Posts: 1599
Joined: Sun Jun 04, 2017 8:15 pm

Good stuff. Mine looks like this:
growstart.png
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'
      
Want to Support the Site?

Use this Amazon referral link and any purchase you make within 24 hrs will earn LEDgardener a commission at no cost to you!
dirkdiggler147
LED-Curious
LED-Curious
Reactions:
Posts: 20
Joined: Fri Jun 12, 2020 9:52 pm

That's awesome, exactly what I was looking for @LEDG

Thanks for posting!

By the way when is the next video up :)
User avatar
LEDG
Site Admin
Reactions:
Posts: 1599
Joined: Sun Jun 04, 2017 8:15 pm

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.
Want to Support the Site?

Use this Amazon referral link and any purchase you make within 24 hrs will earn LEDgardener a commission at no cost to you!
dirkdiggler147
LED-Curious
LED-Curious
Reactions:
Posts: 20
Joined: Fri Jun 12, 2020 9:52 pm

@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
User avatar
LEDG
Site Admin
Reactions:
Posts: 1599
Joined: Sun Jun 04, 2017 8:15 pm

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.
Want to Support the Site?

Use this Amazon referral link and any purchase you make within 24 hrs will earn LEDgardener a commission at no cost to you!
Reeper13
LED-Curious
LED-Curious
Reactions:
Posts: 1
Joined: Sat Oct 03, 2020 7:04 pm

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
Gromyjoe
LED Enthusiast
LED Enthusiast
Reactions:
Posts: 48
Joined: Fri Jul 03, 2020 2:28 pm

check spacing, it takes some getting use to but having one thing out of place can mess everything up.
Gromyjoe
LED Enthusiast
LED Enthusiast
Reactions:
Posts: 48
Joined: Fri Jul 03, 2020 2:28 pm

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
Gromyjoe
LED Enthusiast
LED Enthusiast
Reactions:
Posts: 48
Joined: Fri Jul 03, 2020 2:28 pm

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!
Post Reply