!secret not working in packages

Hello,
I see a strange behavior when using !secret within a package.
It’s not working.

This is my package:

# Sensor
sensor:
  - platform: miflora
    mac: secret! miflora_fioriera_mac
    name: fioriera
    force_update: false
    median: 3
    #go_unavailable_timeout: 43200
    monitored_conditions:
      - moisture
      - light
      - temperature
      - conductivity
      - battery

# Integration
plant:
    Fioriera:
      sensors:
        moisture: sensor.fioriera_moisture
        battery: sensor.fioriera_battery
        temperature: sensor.fioriera_temperature
        conductivity: sensor.fioriera_conductivity
        brightness: sensor.fioriera_light_intensity
      # Customize the minimum battery percentage level
      min_battery: 20
      # Customize the following values based on the plant type: Succulente
      min_moisture: 7
      max_moisture: 50
      min_conductivity: 300
      max_conductivity: 1000
      min_temperature: 8
      max_temperature: 35
      min_brightness: 3000 #https://www.home-assistant.io/integrations/plant/#min_brightness
      max_brightness: 130000
      check_days: 3 #https://www.home-assistant.io/integrations/plant/#check_days

Which shows values only if I replace

mac: secret! miflora_fioriera_mac

with the actual address

mac: 'xx:xx:xx:xx:xx'

And yes, I have the string miflora_fioriera_mac in secrets.yaml but it seems it’s not being retrieved.

Can anyone comment and let me know what I’m doing wrong or if this is confirmed to be a bug?

Thanks!

It’s suppose to be

mac: !secret miflora_fioriera_mac
2 Likes

and it works when you specify it correctly

1 Like

Thanks both @duceduc and @DavidFW1960
Such a silly error :sweat:
I always check the configuration but this was not caught by the parser.
Cheers!