Query in InfluxDB sensor is now templatable#7634
Conversation
|
@titilambert, thanks for your PR! By analyzing the history of the files in this pull request, we identified @bestlibre and @fabaff to be potential reviewers. |
There was a problem hiding this comment.
line too long (83 > 79 characters)
There was a problem hiding this comment.
You should only instantiate templates using voluptuous. So use cv.template as a validator and set the hass object on it if it is not None.
7a809d9 to
44ca798
Compare
44ca798 to
aba526a
Compare
There was a problem hiding this comment.
local variable 'query_template' is assigned to but never used
undefined name 'formated_query'
There was a problem hiding this comment.
local variable 'query_template' is assigned to but never used
undefined name 'template'
undefined name 'formated_query'
aba526a to
7de7728
Compare
7de7728 to
144a4f0
Compare
|
Tests passed and all requests done ! |
There was a problem hiding this comment.
We should render the template each time the sensor updates and we send a new query to influxdb, so add it in InfluxSensorData.
144a4f0 to
483e3b0
Compare
483e3b0 to
4ae0a78
Compare
4ae0a78 to
11909da
Compare
11909da to
48beebc
Compare
48beebc to
b908129
Compare
|
@balloob Changes done ! |
|
Top! Thanks 👍 🐬 |
Description:
Query in InfluxDB sensor is now templatable
Example entry for
configuration.yaml(if applicable):Checklist:
toxrun successfully. Your PR cannot be merged unless tests pass