Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Barometer only devices #407

Open
turboproc opened this issue Nov 5, 2018 · 1 comment
Open

Barometer only devices #407

turboproc opened this issue Nov 5, 2018 · 1 comment

Comments

@turboproc
Copy link

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 = [];
    };
`
@lokonli
Copy link

lokonli commented Nov 9, 2018

What is the device type and the device subtype? (You can find them in the Domoticz devices overview)

Interpreting the original code then sometimes there is no 'temperature' field, but only a 'data' field. In that case the 'data' field should be interpreted as temperature. I think we should keep that behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants