Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
energy
bmon
Commits
0b0685b7
Commit
0b0685b7
authored
Oct 27, 2014
by
Alan Mitchell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made sure Off command was also decoded.
parent
0f240866
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
bmsapp/storereads.py
bmsapp/storereads.py
+1
-1
No files found.
bmsapp/storereads.py
View file @
0b0685b7
...
...
@@ -33,7 +33,7 @@ def convert_val(ts, reading_id, val, db):
if
type
(
val
)
in
(
str
,
unicode
):
if
(
'True'
in
val
)
or
(
'Closed'
in
val
)
or
(
'On'
in
val
)
or
(
val
.
startswith
(
'Motion'
)
or
(
val
.
startswith
(
'Light'
))
or
(
val
.
startswith
(
'Voltage'
))):
val
=
1.0
elif
(
'False'
in
val
)
or
(
'Open'
in
val
)
or
(
val
.
startswith
(
'No'
)):
elif
(
'False'
in
val
)
or
(
'Open'
in
val
)
or
(
'Off'
in
val
)
or
(
val
.
startswith
(
'No'
)):
val
=
0.0
else
:
# convert to float the first decimal number
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment