Home Assistant - New Zealand

A little update to our wall tablet dashboard…. We like to shoot off to the beach for a bike ride, esp at low tide… added tide times via this GitHub - muxa/home-assistant-niwa-tides: Custom integration for Home Assistant to get New Zealand tide information from NIWA Tides API - then added a panel to the dashboard:

2 Likes

Very interested in the YAML for this, if you’re able to share?

I like to make HA do all the work for me LOL

type: custom:mushroom-template-card
primary: High Tide
secondary: >-
  The current tide phase is {{ state_attr('sensor.local_tides', 'tide_phase')
  }} 

  and the upcoming high tide is projected to reach {{
  state_attr('sensor.local_tides', 'next_high_tide_level') }} meters. 

  Anticipated within the next {{ state_attr('sensor.local_tides',
  'next_high_tide_hours') }} hours, it is expected to occur at {{
  state_attr('sensor.local_tides', 'next_high_tide_time').strftime('%H:%M') }}
layout: vertical
multiline_secondary: true
tap_action:
  action: none
hold_action:
  action: none
double_tap_action:
  action: none

Oh very cool - totally using this thanks!

for a tide chart, take a look here Tides in Lovelace - #14 by nickrout

i do a similar thing with a smart washing if your using one LMFAO

altho i really do need to clean up the the sensors that go with it
the weather station forecast for the day cuts off at 3pm so then it looks for the over night forecast which makes shitty dunedin reading
when the washing is running itll add more

type: custom:stack-in-card
card_mod:
  style: |
    ha-card { 
      background-color: {{ '#1A3326' if is_state('sensor.washing_machine_run_state', 'Pre-Washing') or is_state('sensor.washing_machine_run_state', 'Washing') or is_state('sensor.washing_machine_run_state', 'Rinsing') or is_state('sensor.washing_machine_run_state', 'Spinning') else 'none' }};
    } 
cards:
  - type: custom:mushroom-template-card
    primary: Washing Machine
    secondary: >-
      Expect a {{ states('sensor.precipitation_sensor') | default('0') | int }}%
      chance of rain with a high of {{ states('sensor.temperature_sensor') |
      default('0') | int }}°C, resulting in a {{
      states('sensor.washing_recommendation') | default('0') | int }}%
      likelihood of achieving dry laundry.{% set remaining_time =
      states('sensor.washing_machine_remaining_time') | default('0:00:00') %}{%
      if remaining_time != '0:00:00' and remaining_time != '0:00:01' %}
      Currently in the {{ {'Pre-Washing': 'Pre Wash', 'Washing': 'Washing',
      'Rinsing': 'Rinsing', 'Spinning':
      'Spinning'}.get(states('sensor.washing_machine_run_state'), '') }} cycle,
      there are {{ remaining_time | regex_replace('^0:00:00$', '') | trim }}
      minutes remaining{% endif %}
    layout: vertical
    entity: sensor.washing_machine
    multiline_secondary: true
    card_mod:
      style: |
        ha-card {
          height: 200px !important;
        }    

Probability of Rain Sensor

# Probability of Rain
  - platform: template
    sensors:
      precipitation_sensor:
        friendly_name: "Day / Night Rain Probability"
        unique_id: new_probability_sensor
        value_template: >-
          {% set precipitation_0d = states('sensor.imosgi10_precipitation_probability_0d') %}
          {% set precipitation_1n = states('sensor.imosgi10_precipitation_probability_1n') %}
          {% if precipitation_0d == 'unknown' %}
            {{ precipitation_1n }}
          {% else %}
            {{ precipitation_0d }}
          {% endif %}
        unit_of_measurement: '%'

Will it Dry Sensor

# Drying
  - platform: template
    sensors:
      washing_recommendation:
        friendly_name: "Washing Recommendation"
        unique_id: washing_recommendation
        value_template: >-
          {% set rain_percentage = states('sensor.precipitation_sensor')|float %}
          {% set temperature = states('sensor.temperature_sensor')|float %}
          {% set rain_weight = 0.7 %}
          {% set temp_weight = 0.2 %}
          {% set rain_factor = 1 - rain_percentage / 100 %}
          {% set temp_factor = (temperature - 10) / (15 - 10) %}
          {% set combined_percentage = (rain_weight * rain_factor + temp_weight * temp_factor) * 100 %}
          {{ max(min(combined_percentage, 100), 0)|round }}
        unit_of_measurement: '%'
        icon_template: >-
          {% set icon = 'mdi:weather-sunny' %}
          {% if states('sensor.temperature_sensor')|float > 0 %}
            {% set icon = 'mdi:weather-pouring' %}
          {% endif %}
          {% if states('sensor.forecast_total_3')|float < 15 %}
            {% set icon = 'mdi:snowflake' %}
          {% endif %}
          {{ icon }}
        entity_id:
          - sensor.temperature_sensor
          - sensor.precipitation_sensor

Hi all,

I’m based in Wanaka and have been using Home Assistant for many years after migrating from OpenHAB.

I have many cool HA automations running including my Zehnder ComfoAir ventilation system, a Velux skylight, and SunCraft motorised shade sails among others.

I run a Davis weather station but I’ve always been super keen to get hold of a good reliable weather forecast as most API’s such as AerisWeather only estimate for Wanaka and they are very poor at it.

I see MetService have a new API at MetService - Te Ratonga Tirorangi - has anyone had a play with it? I admit not being all that comfortable trying work my way around API’s as I’m not a programmer.

I note that @Damaar has been trying to integrate it with questions here - but I thought I’d see if anyone else has had any luck with it?

Cheers, Tim

There’s actually 3 of us! I’ve been using Home Assistant for about 6 years but never bothered to check the Social section for anything NZ related before - I mainly keep an eye on the Australian hardware thread for any new toys to add to my setup.

Main thing I’m trying to solve at the moment is:

  1. What EVSE to get that I can control from HA. Something that supports OCPP would probably be best, SmartEVChargers (based in CHCH selling what I think are rebadged Rolecs) sell some that claim OCPP 1.6j support but it could be a bit of a gamble for full compatibility. Evnex (designed and built in Chch) would be the top contender if it wasn’t cloud based.
  2. How to get the SOC for my Ioniq5. I’m thinking maybe a Wican OBD that then talks to HA via MQTT.

I’m on the Z energy EV plan, cheap power from 9pm-7am and free power from 3am-6am, so I want to maximise the amount of charging it does during the free power but scale back a bit if the dishwasher and washing machine are running (also controlled by HA), but if the SOC is below a threshold also charge during the off peak rate hours.

i just send all my weather station info to weather underground and then use Wundergroundpws to bring it back to HA, youll find it in HACS integrations

Yeah, I’ve done this in the past and while it returns current weather from my station just fine the forecasting is rubbish for here.

Very interested to see if you come up with a solution for this! I started investigating various OBD-II adapters for my IONIQ5 but didn’t get far.

I have a Wallbox charger which integrates into HA just fine so I have the charging bit sorted. Just need to know the SOC from the car.

I have a Tesla so use any dumb charger and instead control the charge rate using the car. Is there an API or integration for the Ioniq itself like Tesla?
Here is a blueprint I created which controls the charge rate based on load on the main power feed to the house - doesnt do schedulong thats done separately.

You maybe able to reuse some of the logic to create something similar.

Unfortunately not, Hyundai models in NZ and Australia don’t have an app/API access, I don’t think they’ve installed the necessary hardware. Thanks for the blueprint, I’ll take a look.

1 Like

have you searched for your weather station here … i should of done it before posting but didnt on look after and i see there heaps of info within this forum

I’m not sure what you’re on about here. I’m after a reasonable weather forecast for Wanaka. Since my weather station doesn’t provide a forecast and WeatherUnderground forecasts are completely unreliable for here I was hoping to be able to hook into the MetService API easily without resorting to deciphering it myself.

I’ll let you know. My car is with Hyundai at the moment getting one of the battery modules replaced (I discovered a faulty cell about 4 weeks ago) so I’m waiting to see that it all goes smoothly before I continue. The Wallbox looks good, it’s just a bit pricier than I was hoping to spend.

Have you looked at met.no - it is a built in integration, and despite being Norwegian based is surprisingly good. They must have a bigger computer :slight_smile:

I created a custom integration for Contact Energy a few months ago. Your power consumption data gets loads as statistics into the Energy dashboard in HA.

2 Likes

I made a custom integration for Meridian Energy a few months ago. Same as the Contact Energy one, it populates your Energy dashboard.

3 Likes