Jun-29-2018, 01:05 AM
I have original code like this below
this code will decode :
house_code = B1
house_func = On
Now I have 2 lines input :
02/13 23:54:28 Rx PL HouseUnit: A1
02/13 23:54:28 Rx PL House: A Func: On
I want to modify the code so that will have result :
house_code = A1
house_func = On
Anybody can help me?
if line[15:20] == 'Rx RF': # decode RF message. format is: # 02/13 23:54:28 Rx RF HouseUnit: B1 Func: On line_list = line.split(' ') house_code = line_list[5]; house_func = line_list[7] return house_code, {'func': house_func}, 'button'Like in description, if input "02/13 23:54:28 Rx RF HouseUnit: B1 Func: On"
this code will decode :
house_code = B1
house_func = On
Now I have 2 lines input :
02/13 23:54:28 Rx PL HouseUnit: A1
02/13 23:54:28 Rx PL House: A Func: On
I want to modify the code so that will have result :
house_code = A1
house_func = On
Anybody can help me?