question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Changing configuration parameter to sensor level

See original GitHub issue

Having an idea about the configuration parameters, that I would like to discuss. We now have configuration parameters as lists and dictionaries. In each list we have to define a MAC address, like this:

sensor:
  - platform: mitemp_bt
    encryptors:
      'A4:C1:38:2F:86:6C': '217C568CF5D22808DA20181502D84C1B'
    sensor_fahrenheit:
      - 'C4:7C:8D:6B:4F:F3'
    sensor_names:
      'A4:C1:38:2F:86:6C': 'Livingroom'
    whitelist:
     - 'B4:7C:8D:6B:4F:D3'

I think it would make more sense to define this per sensor, something like this.

sensor:
  - platform: mitemp_bt
     automatic_add: False
     entities:
     - mac: 'A4:C1:38:2F:86:6C'
       encryption_key: '217C568CF5D22808DA20181502D84C1B'
       name: 'Livingroom'
     - mac: 'C4:7C:8D:6B:4F:F3'
       unit_of_measurement: fahrenheit
     - mac: 'B4:7C:8D:6B:4F:D3' 

I understand that this is a significant breaking change, but it has the advantage that we can expand this in a second step to define other parameters on sensor level, like rounding, median, etc.

I’m not saying that we have to make this change, but I see some advantages, despite the breaking change (and quite some work to make this change). Let’s first discuss @Magalex2x14 what you think of this idea and see where we end up.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:6

github_iconTop GitHub Comments

1reaction
Magalex2x14commented, Nov 3, 2020

Wow) Serious approach) I like it, yes.

1reaction
Ernst79commented, Nov 2, 2020

I will have a look tomorrow what the usual parameter naming is. I’ve seen sensors, as well as entities, I thought. I used automatic_add, as it was a parameter for rfxtrx component. autodiscovery sound better, I agree. I will check the developer docs of home assistant.

For the rounding option, etc, we can make a parameter on component level, which can be overruled on sensor level (or perhaps even on temperature sensor/ humidity sensor level).

Lets start with the dictionaries and lists first. I will start looking into this and will make a separate branch for this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Automated configuration - IBM
Configuration parameters can be changed with the following command where parami is of the form sensorname.sensorattribute: prompt# mmperfmon config update ...
Read more >
ZSE44 Temperature | Humidity XS Sensor Advanced Settings
Here is a full list of advanced settings (parameters) for the ZSE44 Temperature | Humidity XS Sensor: Battery Reporting. Parameter 1: Set the...
Read more >
Configuration Parameter - an overview | ScienceDirect Topics
We presented a novel approach for designing H2O2 decontamination processes by integrating parameter configuration and scheduling. Models were developed that can ...
Read more >
Advanced Configuration - Z-Wave by Jasco
The following Advanced Operation parameters require that you have a controller that supports the advanced configuration command class.All On/All Off
Read more >
Configuration parameters - Passive BLE Monitor integration
Configuration parameters at component level. bt_interface; hci_interface; discovery ... We cannot change the frequency with which sensor sends data.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found