Hallo zusammen,
ich bekomme mit sun.pos keine Werte in Grad. Das Argument "degree=True" macht bei mir Probleme. Mein Ziel ist es, in der Visu permanent den Winkel und die Höhe der Sonne (als Wert, nicht als Grafik) darzustellen.
Kann mir jemand sagen, was ich falsch gemacht habe?
Vielen Dank, viele Grüße
Arne
/usr/local/smarthome/logics/sonnenstand.py
/usr/local/smarthome/items/gesamt.conf
/usr/local/smarthome/etc/logic.conf
ich bekomme mit sun.pos keine Werte in Grad. Das Argument "degree=True" macht bei mir Probleme. Mein Ziel ist es, in der Visu permanent den Winkel und die Höhe der Sonne (als Wert, nicht als Grafik) darzustellen.
Kann mir jemand sagen, was ich falsch gemacht habe?
Vielen Dank, viele Grüße
Arne
Code:
2015-05-07 09:19:05,563 ERROR Sonnenstand Logic: Sonnenstand, File: /usr/local/smarthome/logics/sonnenstand.py, Line: 4, Method: <module>, Exception: pos() got an unexpected keyword argument 'degree' -- scheduler.py:_task:334
Traceback (most recent call last):
File "/usr/local/smarthome/lib/scheduler.py", line 327, in _task
exec(obj.bytecode)
File "/usr/local/smarthome/logics/sonnenstand.py", line 4, in <module>
azimut, altitude = sh.sun.pos(degree=True)
TypeError: pos() got an unexpected keyword argument 'degree'
/usr/local/smarthome/logics/sonnenstand.py
Code:
#!/usr/bin/python3.2
# aktuelle Sonnenposition
azimut, altitude = sh.sun.pos(degree=True)
azimut = round(azimut,2)
altitude = round(altitude,2)
sh.Sonnenstand.Winkel(azimut)
sh.Sonnenstand.Hoehe(altitude)
logger.info("sonnenstand winkel {0}".format(azimut))
logger.info("sonnenstand neigung {0}".format(altitude))
Code:
[Sonnenstand]
[[aufgang]]
type = foo
visu_acl = r
enforce_updates = true
[[untergang]]
type = foo
visu_acl = r
enforce_updates = true
[[Winkel]]
type = num
visu = yes
visu_acl = r
knx_dpt = 5
enforce_updates = true
[[Hoehe]]
type = num
visu = yes
visu_acl = r
knx_dpt = 5
enforce_updates = true
Code:
[Sonnenstand]
filename = sonnenstand.py
crontab = init
cycle = 600



Kommentar