New version of the plant integration

It was a bug that was fixed in the latest beta.

Created relases for both flower-card and plant now.
Upgrade to 2024.4.1 of both, and you should be fine.

You mean the ones that haven been added 30 minutes ago?
Will this show up later as an automatic update - or do I have to manually install it?

It will show up in HACS as soon as HACS reloads the repository. Usually happens within a few hours.

1 Like

Is there a way to use a dynamic battery sensor in the flower-card?
This isn’t working:

type: custom:auto-entities
card:
  type: custom:layout-card
  layout:
    layout:
      grid-gap: 1px 1px
      grid-template-columns: 50% 50%
      grid-template-rows: auto
      mediaquery:
        '(max-width: 1200px)':
          grid-gap: 1px 1px
          grid-template-columns: 100%
        '(max-width: 799px)':
          grid-gap: 1px 1px
          grid-template-columns: 100%
    layout_type: custom:grid-layout
    type: custom:layout-card
    cards: []
  layout_type: custom:horizontal-layout
card_param: cards
filter:
  include:
    - and:
        - domain: plant
        - area: tuin
      options:
        type: custom:stack-in-card
        mode: vertical
        cards:
          - type: custom:flower-card
            display_type: full
            show_bars: none
            entity: this.entity_id
            battery_sensor: >-
              {% if expand('group.bodemsensor_japanse_sneeuwbal') | selectattr(
              'entity_id','eq', this.entity_id) | list | count == 1 %}
                {%  set batsensor = 'sensor.border_japanse_sneeuwbal_battery_percent' %}
              {% else %}
                {%  set batsensor = 'sensor.border_japanse_sneeuwbal_battery_percent' %}
              {% endif %}
             {{ batsensor }}

Hi @Olen thank you for your plant integration!

I have an issue, I’m trying to create a new plant from UI, but it says that I don’t have entites for the soil moisture sensor:

But I have installed the Ecowitt GW1100 gateway and 2 WH51 Soil moisture sensors, do I have to do something more?

Thanks! :slight_smile:

The Soil Moisture sensors of the integration should have device_class moisture, not humidity.

See definitions here:

  • humidity: Percentage of humidity in the air in %
  • moisture: Percentage of water in a substance in %

Create a bugreport for the Ecowitt integrations.

In the mean time, you can use the “Replace sensor” service call (see README) to add the moisture sensor manually. The service call does not validate the device class of the sensor it adds.

Hi Olen,

thanks for the reply :wink:

for now I’ve done a template helper and it works:

- unique_id: soil_one
  trigger:
    - platform: time_pattern
      seconds: "/30"
    - platform: event
      event_type: event_template_reloaded
  sensor:
    - name: soil_one
      unique_id: soil_one
      state: "{{ states('sensor.gw1100a_soil_moisture_1') }}"
      unit_of_measurement: "%"
      device_class: moisture

Otherwise I will use the replace sensor service call.

thanks again! :wink:

My take on this:

image

1 Like

Very nice touch. Care to share code?

One beer :beer: :smiley:
Sure, here you go.

type: custom:stack-in-card
keep:
  margin: false
  box_shadow: false
  background: false
cards:
  - type: grid
    square: false
    columns: 1
    cards:
      - type: custom:mushroom-template-card
        entity: input_button.golden_cane_palm_last_watered
        primary: Golden Cane Palm
        secondary: >
          Last watered: {{ (as_timestamp(now()) -
          as_timestamp(states.input_button.golden_cane_palm_last_watered.last_changed
          | default(0)) | int ) | timestamp_custom("%Hh %Mm", false)}} ago
        icon: mdi:palm-tree
        icon_color: white
        tap_action: more-info
  - type: grid
    square: false
    columns: 3
    cards:
      - type: custom:mushroom-entity-card
        entity: sensor.ble_moisture_plant_sensor
        primary_info: state
        secondary_info: false
        name: '%'
        icon_color: white
      - type: custom:mushroom-entity-card
        entity: sensor.ble_temperature_plant_sensor
        primary_info: state
        secondary_info: false
        name: °C
        icon_color: white
      - type: custom:mushroom-entity-card
        entity: sensor.ble_conductivity_plant_sensor
        icon: mdi:electron-framework
        icon_color: white
        primary_info: state
        secondary_info: false
        name: qS/cm
  - type: picture
    image: /local/images/gcp2.png
    image_entity: input_button.golden_cane_palm_last_watered
    tap_action:
      action: more-info
    card_mod:
      style: |
        ha-card {
        margin: -45px 0px !important;
        }
1 Like

You can copy the sensor name and put it manually, it will recognize it. I have it working that way in my configuration.