mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-20 19:36:02 +00:00
98_dewpoint.pm: Restrict manipulation of STATE of target device
git-svn-id: https://svn.fhem.de/fhem/trunk@16733 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
e613ca5205
commit
294f6d16b5
@ -1,5 +1,7 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||||
# Do not insert empty lines here, update check depends on it.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- change: 98_dewpoint: Don't manipulate STATE of target device if has
|
||||||
|
stateFormat defined.
|
||||||
- new: 55_DWD_OpenData: weather and alerts from DWD
|
- new: 55_DWD_OpenData: weather and alerts from DWD
|
||||||
- bugfix: 74_Unifi: Cookies for UnifiController 5.9.4
|
- bugfix: 74_Unifi: Cookies for UnifiController 5.9.4
|
||||||
- bugfix: 74_GardenaSmartDevice: fix uninitialized value $abilities
|
- bugfix: 74_GardenaSmartDevice: fix uninitialized value $abilities
|
||||||
|
@ -311,7 +311,9 @@ dewpoint_Notify($$)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$sensor = $new_name;
|
$sensor = $new_name;
|
||||||
if ($temp_name ne "T") {
|
|
||||||
|
my $has_state_format = defined(AttrVal($dev->{NAME}, "stateFormat", undef));
|
||||||
|
if ($temp_name ne "T" || $has_state_format) {
|
||||||
$current = $dewpoint;
|
$current = $dewpoint;
|
||||||
readingsBulkUpdate($dev, $sensor, $current);
|
readingsBulkUpdate($dev, $sensor, $current);
|
||||||
readingsEndUpdate($dev, 1);
|
readingsEndUpdate($dev, 1);
|
||||||
@ -547,9 +549,11 @@ dewpoint_absFeuchte ($$)
|
|||||||
If optional <temp_name>, <hum_name> and <new_name> is specified
|
If optional <temp_name>, <hum_name> and <new_name> is specified
|
||||||
then read temperature from reading <temp_name>, humidity from reading <hum_name>
|
then read temperature from reading <temp_name>, humidity from reading <hum_name>
|
||||||
and write the calculated dewpoint to reading <new_name>.<br>
|
and write the calculated dewpoint to reading <new_name>.<br>
|
||||||
If <temp_name> is T then use temperature from state T: H:, add <new_name> to the state.
|
<b>Obsolete, avoid for new definitions</b><br>
|
||||||
|
If <temp_name> is T then use temperature from state T: H:, add <new_name> to the STATE.
|
||||||
|
The addition to STATE only occurs if the target device does not define attribute "stateFormat".
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br><br>
|
||||||
|
|
||||||
Example:<PRE>
|
Example:<PRE>
|
||||||
# Compute the dewpoint for the temperature/humidity
|
# Compute the dewpoint for the temperature/humidity
|
||||||
@ -565,12 +569,13 @@ dewpoint_absFeuchte ($$)
|
|||||||
|
|
||||||
# Compute the dewpoint for the temperature/humidity
|
# Compute the dewpoint for the temperature/humidity
|
||||||
# events of the device Aussen_1 offering temperature and humidity
|
# events of the device Aussen_1 offering temperature and humidity
|
||||||
# and insert is into STATE.
|
# and insert is into STATE unless Aussen_1 has attribute "stateFormat" defined.
|
||||||
|
# If "stateFormat" is defined then a reading D will be generated.
|
||||||
define dew_state dewpoint dewpoint Aussen_1 T H D
|
define dew_state dewpoint dewpoint Aussen_1 T H D
|
||||||
|
|
||||||
# Compute the dewpoint for the temperature/humidity
|
# Compute the dewpoint for the temperature/humidity
|
||||||
# events of all devices offering temperature and humidity
|
# events of all devices offering temperature and humidity
|
||||||
# and insert the result into the STATE.
|
# and insert the result into the STATE. (See example above).
|
||||||
# Example STATE: "T: 10 H: 62.5" will change to
|
# Example STATE: "T: 10 H: 62.5" will change to
|
||||||
# "T: 10 H: 62.5 D: 3.2"
|
# "T: 10 H: 62.5 D: 3.2"
|
||||||
define dew_state dewpoint dewpoint .* T H D
|
define dew_state dewpoint dewpoint .* T H D
|
||||||
@ -699,9 +704,11 @@ dewpoint_absFeuchte ($$)
|
|||||||
und Luftfeuchte und erzeugt daraus ein neues Reading namens dewpoint.<br/>
|
und Luftfeuchte und erzeugt daraus ein neues Reading namens dewpoint.<br/>
|
||||||
Wenn <temp_name>, <hum_name> und <new_name> angegeben sind,
|
Wenn <temp_name>, <hum_name> und <new_name> angegeben sind,
|
||||||
werden die Temperatur aus dem Reading <temp_name>, die Luftfeuchte aus dem
|
werden die Temperatur aus dem Reading <temp_name>, die Luftfeuchte aus dem
|
||||||
Reading <hum_name> gelesen und als berechneter Taupunkt ins Reading <new_name> geschrieben.<br>
|
Reading <hum_name> gelesen und als berechneter Taupunkt ins Reading <new_name> geschrieben.<br><br>
|
||||||
Wenn <temp_name> T lautet, wird die Temperatur aus state T: H: benutzt
|
<b>Veraltet, für neue Definitionen nicht mehr benutzen</b><br>
|
||||||
und <new_name> zu state hinzugefügt.
|
Wenn <temp_name> T lautet, wird die Temperatur aus state T: H: benutzt
|
||||||
|
und <new_name> zu STATE hinzugefügt. Das hinzufügen zu STATE erfolgt nur, falls im Zielgerät
|
||||||
|
das Attribut "stateFormat" nicht definiert ist.<br>
|
||||||
<br/>
|
<br/>
|
||||||
Beispiele:
|
Beispiele:
|
||||||
<pre>
|
<pre>
|
||||||
@ -718,12 +725,13 @@ dewpoint_absFeuchte ($$)
|
|||||||
|
|
||||||
# Berechnet den Taupunkt aufgrund von Temperatur und Luftfeuchte
|
# Berechnet den Taupunkt aufgrund von Temperatur und Luftfeuchte
|
||||||
# in Ereignissen, die vom Gerät Aussen_1 erzeugt wurden und ergänzt
|
# in Ereignissen, die vom Gerät Aussen_1 erzeugt wurden und ergänzt
|
||||||
# mit diesem Wert den Status STATE.
|
# mit diesem Wert den Status STATE, falls in Aussen_1 das Attribut "stateFormat" nicht definiert ist.
|
||||||
|
# Falls "stateFormat" definiert ist, wird das reading "D" angelegt.
|
||||||
define dew_state dewpoint dewpoint Aussen_1 T H D
|
define dew_state dewpoint dewpoint Aussen_1 T H D
|
||||||
|
|
||||||
# Berechnet den Taupunkt aufgrund von Temperatur und Luftfeuchte
|
# Berechnet den Taupunkt aufgrund von Temperatur und Luftfeuchte
|
||||||
# in Ereignissen, die von allen Geräten erzeugt wurden die diese Werte ausgeben
|
# in Ereignissen, die von allen Geräten erzeugt wurden die diese Werte ausgeben
|
||||||
# und ergänzt mit diesem Wert den Status STATE.
|
# und ergänzt mit diesem Wert den Status STATE. (Siehe Beispiel oben).
|
||||||
# Beispiel STATE: "T: 10 H: 62.5" wird verändert nach
|
# Beispiel STATE: "T: 10 H: 62.5" wird verändert nach
|
||||||
# "T: 10 H: 62.5 D: 3.2"
|
# "T: 10 H: 62.5 D: 3.2"
|
||||||
define dew_state dewpoint dewpoint .* T H D
|
define dew_state dewpoint dewpoint .* T H D
|
||||||
|
Loading…
x
Reference in New Issue
Block a user