Skip to content

Barometer only devices #407

Description

@turboproc

When integrating my AgoControl environment with Domoticz/Dashticz I noticed that Dashticz behaves weird when working with devices that are essentially just a barometer, i.e. without a temperature component.
When checking main.js, in particular getTempBumBarBlock I understand that a Temp block is always being created, even in the case that no temp information will be available.
The issue was quickly fixed by making the creation of the Temp Block depending on the presence of a Temperature device. What I'm not sure is whether I'm destroying a certain concept that I overlooked or whether this was a real ommision.

 if (typeof(device['Temperature']) !== 'undefined') {
       blockValues = [
        {
            icon: 'fa-thermometer-half',
            idx: idx + '_1',
            title: device['Name'],
            value: number_format((typeof(device['Temp']) !== 'undefined') ? device['Temp'] : device['Data'], 1),
            unit: _TEMP_SYMBOL
        }
       ];
    } else {
       blockValues = [];
    };
`

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions