Pregnancy Tracking Privately with Tempalate Sensors

Sounds like the pasted yaml is just indented incorrectly. What I usually do since I can never remember indent amounts is to create a tab on a dashboard, THEN go into the raw config to paste the yaml. That way I have something to compare it to. When you highlight that newly pasted yaml, you can use Tab and Shift+Tab to increase/decrease the indent to match the blank tab you created earlier.

Those are my thoughts. I know just enough to be dangerous, so I hope that helps!

I literally open your code in github in RAW and copy into a blank raw dashboard config and get the bellow error.

Your configuration is not valid: n: At path: views -- Expected an array value, but received: undefined

Any ideas on what could be causing. running latest home dash, could something have changed?

Hi @GaryOz, and first of all - congratulations on the baby :wink:
You might’ve already figured it out, but in case you didn’t:

lovelace_raw_config.yaml linked in #36 is not a complete dashboard, but only a single view. It is meant to be added to an existing dashboard, by pasting it after all text in raw configuration editor.
Because you replaced the entire dashboard config, you were missing the initiation of the dashboard (title and views).
Here’s what it should look like. You would paste the contents after views:

title: Example
views:
  - theme: Backend-selected
    path: default_view
    title: Example
    icon: mdi:.....
    badges: []
    cards:
      - type: .....
1 Like

it doesnt seem to work with the images anymore ?
Can anyone help ?

You need to remove unit_of_measurement: ‘Trimester’. That is apparently not a valid value anymore, and there is no error (as far as I can see) in the logs. I spent way too long to find a fix for this.

1 Like

Holy crap, I lost track of this and haven’t been keeping up with what other folks are doing with it! Cool to see so many folks running with it!!! We just found out we’re having another kid, so I thought I’d dust this off and set it up again :sweat_smile:

I’m very excited to try out the work by @tango259!

Did you come up with a solution?
I’m running into an issue where sensor.pregnancy just says Unknown with none of the other attributes, so I think it has to due with the Trimester unit_of_measurement.

Edit: Looking into this further, I guess newer versions of Home Assistant are more strict on unit of measurement usage. Setting a unit_of_measurement implies that the sensor should be a number, so it only accepts numeric numbers. So simply removing that line allows it to work properly.

Does anyone have this up and running (still)? Expecting child 1 and hitting a few “bumps” along the way trying to cross reference the initial setup and latest updates. Seems that HA requires and has deprecated some requirements/dependencies.

Hey all! :wave: I apologize that I haven’t been very responsive over the last couple years. We had some big life changes on top of raising our crazy toddler. But it’s that time in our life again where this will become quite useful in this coming year. Hooray for child number 2! :tada: :partying_face:

There have been a lot of changes to HomeAssistant and some things have been depreciated or modified over the last couple years, as evidenced by the issues some of you have encountered. As I was incorporating the code back into my own HA instance, I started running into these same problems and began doing some optimization. All updated code is available at my project’s Github repo.

Aside from generic code optimization, I restructured some data so it’s organized better. That means that this most recent update has some :warning: breaking changes :warning: from previous versions. But with that, everything should be fixed now. Here is what has been changed:

Configuration Code

  • Changed the main state of sensor.pregnancy from Trimester to Pregnancy Week
  • Removed individual Pregnancy Weeks sensor and moved Days In Week attribute to main Pregnancy Sensor (sensor.pregnancy)
  • Fixed typo in Days In Week attribute. It is now Day In Week
  • Removed separate Pregnancy Weeks attribute since it is now calculated as the main Pregnancy sensor’s state
  • Moved Trimester to be an attribute of the main Pregnancy Sensor.
  • Removed unit of measurement for main sensor since “trimester” is no longer supported by HA
  • Replaced Pregnancy Due Date input datetime with a regular template sensor that automatically calculates due date based on the last period sensor.
  • Removed “Availability” from Pregnancy Days
  • Updated Pregnancy Days Left sensor to use new Pregnancy Due Date sensor
  • Updated all links to use sensor.pregnancy as source of week number
  • Added placeholder sizes for weeks 4 through 7 to Fetal Length and Fetal Weight to prevent “unknown” states and updated starting week number
  • Removed unit of measurement for Fetal Length
  • Added the suffix “inches” to each week for Fetal Length
  • Added attribute for BabyCenter’s weekly pages
  • Updated the fruit size for Week 4

Dashboard
Everything is still mostly the same. Only minor updates to fix dependencies.

  • Minor updates to fix existing sensor dependencies
  • Removed the custom “text-element” card as it’s no longer supported and no longer works. This has been replaced by the custom “text-action-element” card.
  • Added BabyCenter link to markdown card
1 Like

This is so great! unfortunately our baby downloading failed at 12 weeks and couldn’t get any error message due to insufficient data.

Hi all!

I have just managed to get this all set up on my HA, but I’m running into a few issues.

  1. length and weight just shows “unknown”
  2. None of the pictures load.

does any one have any ideas on a fix?