Dashboard - Week tracking

Home Assistant automation projects, questions, etc. go here.
User avatar
LEDG
Site Admin
Reactions:
Posts: 1599
Joined: Sun Jun 04, 2017 8:15 pm

Gromyjoe wrote:
Fri Oct 23, 2020 1:04 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!
Eh, neat idea!
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!
Riddish
LED-Curious
LED-Curious
Reactions:
Posts: 2
Joined: Wed Oct 21, 2020 7:51 am

LEDG wrote:
Tue Jul 07, 2020 4:25 pm
Good stuff. Mine looks like this:

growstart.png

Did you do anything to change the format of the input_datetime?
I used the code you provided and my dashboard looks weird when I use an 'entities' card to display it.
Managed to work around it using a 'glance' card, but I prefer the look of yours

Image

PS: For anyone looking to make this work who is confused, I figured it out by downloading the files at https://github.com/ledgardener/gardenAutomation and looking at how it's done in the config.yaml
This is how it'd look if you did not have any other sensors configured in your config.yaml:

Code: Select all

input_datetime:
  grow_start_date:
    name: Grow Start Date
    has_date: true
    has_time: false

sensor:
  - 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
  - platform: time_date
    display_options:
      - 'time'
      - 'date'
User avatar
LEDG
Site Admin
Reactions:
Posts: 1599
Joined: Sun Jun 04, 2017 8:15 pm

Riddish wrote:
Sat Oct 31, 2020 4:40 am
LEDG wrote:
Tue Jul 07, 2020 4:25 pm
Good stuff. Mine looks like this:

growstart.png

Did you do anything to change the format of the input_datetime?
I used the code you provided and my dashboard looks weird when I use an 'entities' card to display it.
Managed to work around it using a 'glance' card, but I prefer the look of yours

Image

PS: For anyone looking to make this work who is confused, I figured it out by downloading the files at https://github.com/ledgardener/gardenAutomation and looking at how it's done in the config.yaml
This is how it'd look if you did not have any other sensors configured in your config.yaml:

Code: Select all

input_datetime:
  grow_start_date:
    name: Grow Start Date
    has_date: true
    has_time: false

sensor:
  - 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
  - platform: time_date
    display_options:
      - 'time'
      - 'date'
That's really strange. I'm not sure why it'd display like that. If there's one thing I wish was better on HA, it's how they handle the dashboard UI.
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!
Riddish
LED-Curious
LED-Curious
Reactions:
Posts: 2
Joined: Wed Oct 21, 2020 7:51 am

It has little up/down arrows to adjust the date next to it, which disappear when you're not hovering over it.
Unfortunately it keeps blocking the date from displaying properly even when it's not being displayed.

Lovelace is indeed not the most flexible
I've found this to at least allow template usage in the cards, reducing the number of template sensor you'd need to create in the yaml, but haven't played around with it yet:
https://community.home-assistant.io/t/1 ... /105241/35
ljohnso16
LED-Curious
LED-Curious
Reactions:
Posts: 4
Joined: Tue Apr 27, 2021 10:55 pm

I need help writing a value_template for a "Current Status" so i can have an alarm go off when i need to change my light cycles. Propagation Veg and Bloom based on the number of days/weeks that have passed

Code: Select all

<a href='https://ko-fi.com/D1D54GER4' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://cdn.ko-fi.com/cdn/kofi2.png?v=2' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
funky83
LED-Curious
LED-Curious
Reactions:
Posts: 4
Joined: Thu Jan 14, 2021 5:51 pm

hi,
some of you wrote about a guide about doing this week tracking, can you point me to it?
if i understood correctly there's a 3 part video?
jhagdorn
LED-Curious
LED-Curious
Reactions:
Posts: 7
Joined: Sat Aug 07, 2021 7:46 pm

I was thinking of using Google Calendar to store future events for tracking weekly needs of my grow. Currently I have HA scripts that will create the calendar events, but I do not know how to pull the "input_datetime.grow_start_date" and use that to schedule the events for Google calendar.

alias: Add Week 1 to Google Calendar
sequence:
- service: google.add_event
data:
calendar_id: [email protected]
summary: 'EC Range: 200-400 PPM'
description: 'EC Range: 200-400 PPM'
start_date_time: '2021-08-08T00:00:00'
end_date_time: '2021-08-08T23:59:59'
mode: single

----------------
Maybe I can use something like this? And pull the "input_datetime.grow_start_date", to setup the events.

data_template:
start_date_time: '{{ now().timestamp() | timestamp_custom(''%Y-%m-%d %H:%M:%S'',
true)}}'
end_date_time: '{{ (now().timestamp() + 300) | timestamp_custom(''%Y-%m-%d %H:%M:%S'',
true)}}'

-------------

Another thing I was thinking, is there a way to intercept the "Event" when its comes in from Google Calendars, that I could parse the "Summary" or "Description" to dynamically set the Low PPM, High PPM and use them in automations.

Thank you for your time..
j
Post Reply